Closed
Description
This is an oversight of mine when developing the plugin. The package exports these loaders as functions, but webpack expects a string with a path to the plugin as the UseEntry. It then resolves that path using the configuration from resolveLoader
.
TLDR:
Provide the path to loaders in your UseEntry array and DO NOT USE IMPORTS like in the readme. Here is an example using aliases:
resolveLoader: {
alias: {
"webpack-scoped-css-module-loader": path.resolve(__dirname, "node_modules/webpack-scoped-css/src/scopedCssModulesLoader.js"),
"webpack-scoped-css-scope-loader": path.resolve(__dirname, "node_modules/webpack-scoped-css/src/cssScopeLoader.js")
}
},
Then you can provide "webpack-scoped-css-module-loader"
and "webpack-scoped-css-scope-loader"
to your rule.use
array.
When I have time, I'll try to update this package to handle all of this for you. Don't hesitate to ask if you've got any questions or suggestions about this.
Metadata
Metadata
Assignees
Labels
No labels