Answer the question
In order to leave comments, you need to log in
What is the problem with webpack css-modules on windows?
Good afternoon! Tell me who knows what could be the problem with css-modules ?
In this case
module: {
rules: [{
test: /\.(s?css|sass)$/,
exclude: /main\/(components|actions)\/.+\.scss$/,
use: ['style-loader', 'css-loader', 'sass-loader'],
}, {
test: /main\/(components|scenes)\/.+\.scss$/,
...
module: {
rules: [{
test: /\.(s?css|sass)$/,
exclude: /(components|actions).*\.scss$/,
use: ['style-loader', 'css-loader', 'sass-loader'],
}, {
test: /(components|scenes).*\.scss$/,
...
<Dropdown styleName="styles.dropdown" >
...
Answer the question
In order to leave comments, you need to log in
There is a suspicion that the matter may be in the separator in the paths. As you know, separators are different in Unix and Windows systems. For a generic solution to the problem, you can use path.sep from the path module. Try using it to write paths.
Here is an example of a regular expression written using path.sep
So you just didn't include them, and the syntax is wrong
https://github.com/TrustyWork/PRP-Webpack4-2018/bl...<Dropdown styleName={styles.dropdown} >
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question