Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webpack@5 asset generator property not supported #1729

Closed
kevinvalk opened this issue Sep 24, 2020 · 9 comments · Fixed by #1753
Closed

Webpack@5 asset generator property not supported #1729

kevinvalk opened this issue Sep 24, 2020 · 9 comments · Fixed by #1753
Labels

Comments

@kevinvalk
Copy link

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.

@LinusBorg
Copy link
Member

Seems this new property is missing as the rules set right here:

const ruleSetCompiler = new RuleSetCompiler([

@LinusBorg LinusBorg added the bug label Sep 24, 2020
@tianyingchun
Copy link

what's progress of this issue? for webpack@5.3.0 with assetModule configuration.

Compiling RuleSet failed: Properties generator are unknown (at ruleSet[0]: [object Object])

@LinusBorg
Copy link
Member

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

sodatea pushed a commit that referenced this issue Oct 29, 2020
…hecks (#1753)

close #1729

Co-authored-by: Thorsten Luenborg <t.luneborg@googlemail.com>
@tianyingchun
Copy link

When will it be released? for v16 alpha

@tianyingchun
Copy link

This fixed has not been used in v16? i have tried v16+ webpack@5 it throw this error.
#1754

@tianyingchun
Copy link

@LinusBorg

@LinusBorg
Copy link
Member

LinusBorg commented Nov 7, 2020

Since we have a regression in the beta.10 release

@LinusBorg
Copy link
Member

It's back in rc.1

@tianyingchun
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants