diff --git a/webpack.common.js b/webpack.common.js index b98656d1..eb51346d 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -4,10 +4,11 @@ const CopyPlugin = require('copy-webpack-plugin'); module.exports = { entry: { - index: path.resolve(__dirname, 'src', 'index.js') + index: path.resolve(__dirname, 'src', 'index.js'), + service_worker: path.resolve(__dirname, 'src', 'serviceWorker', 'service_worker.js'), }, output: { - filename: '[name].[contenthash].js', + filename: '[name].js', path: path.resolve(__dirname, 'dist/web'), clean: true }, @@ -43,7 +44,8 @@ module.exports = { }, plugins: [ new HtmlWebpackPlugin({ - template: './src/index.html' + template: './src/index.html', + chunks : ['index'] }), new CopyPlugin({ patterns: [{