less-loader for ant-design
- Dominant language
- JavaScript
- Stars
- 2.9k
- Forks
- 289
- PR merge metrics
- No merged PRs in 30d
Description
Hi guys,
Have anyone of you tried to implement ant-design before? (i am new to webpack..)
i have encounter some issue regarding less...
And this is the error i got...
```
/Projects/webapp/node_modules/antd/lib/style/index.less:1
(function (exports, require, module, __filename, __dirname) { @import "./themes/default";
^
SyntaxError: Invalid or unexpected token
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:599:28)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object. (/Projects/webapp/node_modules/antd/lib/button/style/index.js:3:1)
```
**webpack.config.js**
Rule i have added to webpack and i actually refer [this link](https://medium.com/@GeoffMiller/how-to-customize-ant-design-with-react-webpack-the-missing-guide-c6430f2db10f) and [this link](https://codeburst.io/ant-design-by-example-part-1-f915e4a5547)
```
module: {
rules: [
{
test: /\.less$/,
use: [
{ loader: "style-loader" },
{ loader: "css-loader" },
{ loader: "less-loader" }
]
}
]
}
```
Please share if you have any clue of this 😄
Tqvm
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.