-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
docs(configuration): Change chunkhash to hash #1445
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
Conversation
Thanks for your contribution but |
Related: #1436 |
That's weird. Webpack 3.3.0 was complaining about that, saying that I needed to use |
Hmmm I just used |
Maybe it's some combination of things in your config that's causing that error to be thrown, even if that's the case though it may be a bug or maybe the error isn't detailed enough. Or, maybe a breaking change was introduced that I'm not aware of but this wasn't mentioned in either of the release docs issues ( #1318 or #1388 ) or in the main repo's changelog as far as I know. cc @webpack/documentation-team |
OK probably I narrowed down the issue. My output config output: {
path: path.resolve(path.join(__dirname, '/')),
filename: '[name].[chunkhash].js',
chunkFilename: '[name].[chunkhash].js',
publicPath: '/'
} [name].[chunkhash].js
Cannot use [chunkhash] for chunk in '[name].[chunkhash].js' (use [hash] instead) Probably it's not possible to use |
I think the maybe that error is actually flagging the use of |
With HMR enabled you can't use For dev builds with HMR -> use |
The configuration that I am using doesn't use the HMR. The local web server is launched using another technology. Is it because there's the |
It seems that's likely the case, e.g. if webpack is in "Watch Mode" -- W> Note that `[chunkhash]` cannot be used in conjunction with "Watch Mode". For example, if you're using `webpack-dev-server` or `webpack-dev-middleware` during development, you will get an error using `[chunkhash]` within your development configuration. |
I get this error even on production build. I don't run any watcher or HMR thing. webpack --config webpack.config.prod.js --optimize-minimize --colors --profile --progress The |
Found the cause of that error, which is now filed here webpack/webpack#5337 I close the PR |
Awesome -- thanks @ematipico for following up on this! |
The
filename
options supportshash
and notchunkhash
.chunkhash
is only forchunkFilename
option.