webpack: Code-splitting creates request for "undefined.js" 404
Using version webpack@1.3.7
I’ve started using code-splitting and it seems webpack --watch
start outputting broken bundles as soon as I make a change to any file, it’s fixed by just restarting the process (which makes watching pointless).
Chrome outputs the following error to the console:
GET http://.../static/undefined.js 404 (OK)
output: {
path: '/...',
filename: 'static/[name].js',
chunkFilename: 'static/[chunkhash].js'
}
I’m assuming [chunkhash]
for some reason become undefined
when it’s rebuilding the bundle.
PS. The terminal does not seem to print any errors and the bundle is correctly named there:
static/bundle.js 379082 1 [emitted] bundle
static/b8585b0346bbe807fec7.js 1291905 2 [emitted]
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 28 (17 by maintainers)
Commits related to this issue
- fixed global RegExp issue #433 — committed to webpack/webpack by sokra 10 years ago
Got the same problem but with
webpack.js@2.2.1
— one of two entries requests/dist/1-undefined.js
(example repo https://github.com/zemlanin/dynamite)