diff options
Diffstat (limited to 'webpack.config.js')
-rw-r--r-- | webpack.config.js | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/webpack.config.js b/webpack.config.js index 0538655..5c387ee 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -5,7 +5,8 @@ const CopyWebpackPlugin = require('copy-webpack-plugin'); module.exports = { entry: { index: "./src/index.js", - background: "./src/background.js" + background: "./src/background.js", + popup: "./src/popup.js" }, output: { path: path.join(__dirname, "/dist"), @@ -29,15 +30,17 @@ module.exports = { }, plugins: [ new HtmlWebpackPlugin({ - template: "./public/index.html" + chunks: ['index'], + template: "./src/index.html", + filename: "./index.html" + }), + new HtmlWebpackPlugin({ + chunks: ['popup'], + template: "./src/index.html", + filename: "./popup.html" }), new CopyWebpackPlugin([ {from:'./public/', to:'./'} ]), ], - optimization: { - splitChunks: { - chunks: 'all' - } - } }; |