Last active
February 26, 2018 16:10
-
-
Save joe-crick/1ccbf9e158b8e95eebbcb6118a72dac5 to your computer and use it in GitHub Desktop.
Webpack 4 + CSS Modules + LESS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rules: [ | |
// Whatever other rules you have here... | |
{ | |
test: /\.less$/, | |
use: [ | |
{ | |
loader: "style-loader" | |
}, | |
{ | |
loader: "css-loader", | |
options: { | |
sourceMap: true, | |
modules: true, | |
localIdentName: "[local]___[hash:base64:5]" | |
} | |
}, | |
{ | |
loader: "less-loader" | |
} | |
] | |
} | |
] | |
// Rest of your webpack.config.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment