[Support] - How to add less loader
See original GitHub issueThank you for this great plugin.
I’m trying to implement ant.design library with the latest version of create react app and craco. I manged to implement the babel import loader, but i’m currently stuck add implementing the less loader.
Ant design documentation on how to implement less loader https://ant.design/docs/react/customize-theme https://ant.design/docs/react/use-with-create-react-app
My implementation with craco:
module.exports = {
style: {
less: {
loaderOptions: {
modifyVars: {
'primary-color': '#1DA57A',
'link-color': '#1DA57A',
'border-radius-base': '2px',
},
javascriptEnabled: true,
}
},
},
babel: {
plugins: [
["import", { "libraryName": "antd", "libraryDirectory": "es", "style": true}, "ant"],
],
},
}
I think that I misunderstand the documentation on how to add less-loader support with craco. Any help is welcome!
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:6 (4 by maintainers)
Top Results From Across the Web
less-loader | webpack - JS.ORG
webpack provides an advanced mechanism to resolve files. less-loader applies a Less plugin that passes all queries to the webpack resolver if less...
Read more >using less-loader in webpack - Stack Overflow
I have decided I want to start using LESS as well and I have tried to add the less-loader as per the instructions:....
Read more >[Support] - How to add less loader · Issue #5 · dilanx/craco
I'm trying to implement ant.design library with the latest version of create react app and craco. I manged to implement the babel import...
Read more >less-loader - webpack
To begin, you'll need to install less-loader : $ npm install less-loader --save-dev. Then add the loader to your webpack config. For example:....
Read more >Webpack and LESS. How to make them play along nicely
First, the less-loader is run. This passes the content of the file on to the LESS compiler, which then returns compiled CSS. Second,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve Frankensteined together a
craco.config.js
that accomplishes what you want. This can be extracted into a plugin. I used a fresh install usingreact-scripts 2.1.1
.It looks like the current implementation does not support a less loader yet.