Still unraveling this little mystery, but here's the gist of it:
output: {
path: path.resolve(__dirname, '../public/built'),
- filename: '[name].bundle.js', // DOESN'T WORK
publicPath: '/public/', // as it will be served
chunkFilename: '[name]-[chunkhash].js',
},
output: {
path: path.resolve(__dirname, '../public/built'),
+ filename: '[name].js', // WORKS
publicPath: '/public/', // as it will be served
chunkFilename: '[name]-[chunkhash].js',
},
I discovered this after I was having a hard time getting rid of this error:
<project>/node_modules/isomorphic-webpack/dist/factories/createCompilerCallback.js:90
throw new Error('Bundle file does not exist.');
Which led me to add some console.log-ing to see that absoluteEntryBundleName in factories/createCompilerCallback.js wasn't the same as the actual bundle name (it lacked the .bundle bit in the middle).
Not sure what the exact cause of this is (haven't tested to see if output.filename can be used in the demo app like I was using it here -- could be my not-so-straightforward webpack config ... maybe my server-side html rendering which also loops through bundles to add <script /> links)
Still unraveling this little mystery, but here's the gist of it:
I discovered this after I was having a hard time getting rid of this error:
Which led me to add some
console.log
-ing to see thatabsoluteEntryBundleName
infactories/createCompilerCallback.js
wasn't the same as the actual bundle name (it lacked the.bundle
bit in the middle).Not sure what the exact cause of this is (haven't tested to see if
output.filename
can be used in the demo app like I was using it here -- could be my not-so-straightforward webpack config ... maybe my server-side html rendering which also loops through bundles to add<script />
links)