You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.
When I use webapck 5 , to add a module rule width generator,
not use webapck chain,the code like this: rules: [ { test: /\.png/, type: 'asset', generator: { filename: 'img/[name].[hash:8][ext]' } } ]
to use weback chain, the code is config.module .rule('images') .type('asset') .generator({ filename: 'img/[name].[hash:8][ext]', }) .parser({ dataUrlCondition: { maxSize: 5 * 1024 })
but it accur error:
TypeError: config.module.rule(...).test(...).type(...).generator is not a function
I found that the lastest webpack-chain is not support generator, so
Here is the diff that solved my problem:
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
[email protected]
for the project I'm working on.When I use webapck 5 , to add a module rule width generator,
not use webapck chain,the code like this:
rules: [ { test: /\.png/, type: 'asset', generator: { filename: 'img/[name].[hash:8][ext]' } } ]
to use weback chain, the code is
config.module .rule('images') .type('asset') .generator({ filename: 'img/[name].[hash:8][ext]', }) .parser({ dataUrlCondition: { maxSize: 5 * 1024 })
but it accur error:
TypeError: config.module.rule(...).test(...).type(...).generator is not a function
I found that the lastest webpack-chain is not support
generator
, soHere is the diff that solved my problem:
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered: