From 735d8e5aa8b590b37a16c0e1b52a688c43dd5c10 Mon Sep 17 00:00:00 2001 From: Determinant Date: Thu, 7 Feb 2019 01:32:45 -0500 Subject: add popup --- webpack.config.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'webpack.config.js') 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' - } - } }; -- cgit v1.2.3