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

Cannot use 'chunkhash' in webpack dev server #2393

Closed
yannispanousis opened this issue Apr 25, 2016 · 3 comments
Closed

Cannot use 'chunkhash' in webpack dev server #2393

yannispanousis opened this issue Apr 25, 2016 · 3 comments
Labels

Comments

@yannispanousis
Copy link

We are starting multiple entrypoints in the same webpack dev server and expect 'chunkhash' to be available but instead it causes this error:

ERROR in chunk app1 [entry]
[name].[chunkhash].js
Cannot use [chunkhash] for chunk in '[name].[chunkhash].js' (use [hash] instead)

ERROR in chunk app2 [entry]
[name].[chunkhash].js
Cannot use [chunkhash] for chunk in '[name].[chunkhash].js' (use [hash] instead)

ERROR in chunk app3 [entry]
[name].[chunkhash].js
Cannot use [chunkhash] for chunk in '[name].[chunkhash].js' (use [hash] instead)

ERROR in chunk app4 [entry]
[name].[chunkhash].js
Cannot use [chunkhash] for chunk in '[name].[chunkhash].js' (use [hash] instead)

As I understand this option should be available, as it is in a production build, so is it a bug?

For now we have made it use 'hash' in dev server and 'chunkhash' in production build.

Thanks!
Yannis

@sokra
Copy link
Member

sokra commented Apr 29, 2016

Something prevents to from using chunkhash. i. e. HMR?

@jhnns
Copy link
Member

jhnns commented May 3, 2016

I can confirm that this problem is related to using [chunkhash] in conjunction with webpack-dev-server --hot --inline.

Since this is the expected behavior, I'm closing it.

@Getitdan
Copy link

You shouldn't use [chunkhash] with webpack-dev-server. Also, remove new webpack.NamedModulesPlugin() from plugins in Webpack's config, or you'll get an error while separating the manifest to another file. "Don’t use [chunkhash] in development since this will increase compilation time.", from docs.

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

No branches or pull requests

5 participants