Can't set less variable from webpack
See original GitHub issue- I have searched the issues of this repository and believe that this is not a duplicate.
Reproduction link
Steps to reproduce
// webpack.config.js
module.exports = {
rules: [{
test: /\.less$/,
use: [{
loader: 'style-loader',
}, {
loader: 'css-loader', // translates CSS into CommonJS
}, {
loader: 'less-loader', // compiles Less to CSS
options: {
lessOptions: { // If you are using less-loader@5 please spread the lessOptions to options directly
modifyVars: {
'grid-gutter-width':'12px'
},
javascriptEnabled: true,
},
},
}],
// ...other rules
}],
// ...other config
}
What is expected?
Grid column padding will be 6px
What is actually happening?
Nothing
Environment | Info |
---|---|
antd | 4.2.4 |
React | 16.13.1 |
System | Mac OS Latest |
Browser | 81.0.4044.138 |
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Passing less variables from webpack - Stack Overflow
Save this question. Show activity on this post. I'm trying to pass less variables within a webpack configuration to the less loader, naturally....
Read more >less-loader | webpack - JS.ORG
Allows setting the options passed through to Less based off of the loader ... This is especially useful when some of your Less...
Read more >Environment Variables - webpack
The webpack command line environment option --env allows you to pass in as many environment variables as you like. Environment variables will be...
Read more >Module Variables - webpack
This section covers all variables available in code compiled with webpack. Modules will have access to certain data from the compilation process through ......
Read more >Entry Points - webpack
js', }, };. Single Entry Syntax is a great choice when you are looking to quickly set up a webpack configuration for an...
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 Free
Top 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
Yes, it works in v3. It was removed in 4.0. There seems to be no way to set it to global.
@afc163 @zombieJ Need to implement it again?
I need to set custom breakpoints. Is there any update on this. ?