Last active
January 3, 2017 20:53
-
-
Save jouni-kantola/9a3466d900f78a3d7d81f571f76ce55e to your computer and use it in GitHub Desktop.
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
// works in both v1 and v2 | |
{ | |
test: /\.less$/, | |
loader: "style-loader!css-loader!less-loader" | |
} | |
// works in v2 | |
{ | |
test: /\.less$/, | |
use: [ | |
'style-loader', | |
'css-loader', | |
'less-loader' | |
] | |
} | |
// does not work in v2 (results in: Module not found: Error: Can't resolve 'style-loader!css-loader!less-loader') | |
{ | |
test: /\.less$/, | |
use: { | |
loader: "style-loader!css-loader!less-loader" | |
} | |
} | |
// doesn't work in v2 (results in: Module not found: Error: Can't resolve 'style!css!less') | |
{ | |
test: /\.less$/, | |
use: "style!css!less" | |
} | |
// doesn't work in v2 (results in: Module not found: Error: Can't resolve 'style-loader!css-loader!less-loader') | |
{ | |
test: /\.less$/, | |
use: "style-loader!css-loader!less-loader" | |
} | |
// doesn't work in v2 (results in: Module not found: Error: Can't resolve 'style!css!less') | |
{ | |
test: /\.less$/, | |
use: { | |
loader: "style!css!less" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@TheLarkInn: One of the examples I had in the gist was the exact example you gave. I tried again, once more copy/pasting your code, and build doesn't work. Exception thrown, when importing a
.less
file is:Module not found: Error: Can't resolve 'style-loader!css-loader!less-loader'
The configs that do work are either:
Do you want me to create an issue about this, if
!
chaining should work? I'm using [email protected]?