Webpack@5 asset generator property not supported
See original GitHub issueVersion
16.0.0-beta.8
Reproduction link
https://github.com/kevinvalk/vue-loader-generator-issue
Steps to reproduce
- npm install
- webpack
What is expected?
asset main.js 20 bytes [compared for emit] [minimized] (name: main)
./index.js 21 bytes [built] [code generated]
webpack 5.0.0-rc.0 compiled successfully in 253 ms
What is actually happening?
[webpack-cli] Error: Compiling RuleSet failed: Properties generator are unknown (at clonedRuleSet-1: [object Object])
[webpack-cli] TypeError: Cannot read property 'compilers' of undefined
This is related to the new feature from webpack 5 called Asset Modules (https://webpack.js.org/guides/asset-modules/)
Whenever I add:
...
generator: {
filename: `images/[name][ext]`,
},
...
to a rule, vue-loader fails with the error mentioned above.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Webpack asset generator with publicPath not working?
I had the same problem, but i got it to work. The generator does not support publicPath. You have to use the output...
Read more >Webpack 5 - Asset Modules - DEV Community
In this article, I want to tell you about the Asset Modules - an experimental feature of webpack 5, which makes it possible...
Read more >Asset Modules - webpack
Asset Modules. Asset Modules is a type of module that allows one to use asset files (fonts, icons, etc) without configuring additional loaders....
Read more >sass-loader - npm
npm install sass-loader sass webpack --save-dev ... Node Sass does not work with Yarn PnP feature and doesn't support @use rule. Warning.
Read more >API - esbuild
This setting is a convention from Webpack that esbuild respects for any imported file, not just files used with inject. #Loader. Supported by:...
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 FreeTop 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
Top GitHub Comments
Thanks for the bump, just did 2 PRs, for vue-loader v15 and v16.
thanks, it works fine
vue-loader@16.0.0-rc.1
+webpack@5.4.0
+vue-router@4.0.0-rc.1