Closed andraaspar closed 4 years ago
FWIW you can also specify output.filename
to use [name]
:
const path = require('path')
const WorkerPlugin = require('worker-plugin')
module.exports = {
entry: {
foo: './src/index.js',
},
mode: 'production',
output: {
path: path.resolve(__dirname, 'build'),
filename: '[name].js',
},
plugins: [new WorkerPlugin()],
}
The following warning is shown by webpack:
When using two workers like this:
And
webpack.config.js
like this:Workaround:
Specify
output.chunkFilename
with[chunkhash]
. (See above.)