So I’ve been trying to load .less files into my React.JS project. To get my AntDesign theming to work.
My stack: React.JS – Typescript – Snowpack. And want to work with AntDesign Theming, so I need to make the Less.modifyVars work.
I cannot find a clear tutorial to handle this, using Snowpack.
I have installed the snowpack plugin: snowpack-plugin-less, snowpack.config.js configuration:
I have less: 3.13.1 installed.
and added import ‘antd/dist/antd.less’; inside my App.tsx file.
Loading import ‘antd/dist/antd.css’; will update antDesign components correctly with styles.
But not with import ‘antd/dist/antd.less’;
I am sure there’s some configuration I am missing somewhere, but I just cannot figure it out.
A little assistance, maybe a complete example using my tech stack would be great. Thanks!
Source: React – Stack Overflow