question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Webpack@5 asset generator property not supported

See original GitHub issue

Version

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:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
LinusBorgcommented, Oct 28, 2020

Thanks for the bump, just did 2 PRs, for vue-loader v15 and v16.

0reactions
tianyingchuncommented, Nov 8, 2020

thanks, it works fine vue-loader@16.0.0-rc.1 + webpack@5.4.0 + vue-router@4.0.0-rc.1

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found