diff options
Diffstat (limited to 'webpack/webpack.common.js')
-rw-r--r-- | webpack/webpack.common.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/webpack/webpack.common.js b/webpack/webpack.common.js index 70ea347a..162c8b50 100644 --- a/webpack/webpack.common.js +++ b/webpack/webpack.common.js @@ -1,9 +1,10 @@ const webpack = require("webpack"); const path = require('path'); const CopyPlugin = require('copy-webpack-plugin'); +const BuildManifest = require('./webpack.manifest'); const srcDir = '../src/'; -module.exports = { +module.exports = env => ({ entry: { popup: path.join(__dirname, srcDir + 'popup.ts'), background: path.join(__dirname, srcDir + 'background.ts'), @@ -34,11 +35,14 @@ module.exports = { }, plugins: [ // exclude locale files in moment - new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), new CopyPlugin([ - { from: '.', to: '../' } + { from: '.', to: '../', ignore: ['manifest.json'] } ], {context: 'public' } ), + new BuildManifest({ + browser: env.browser, + pretty: env.mode === "production" + }) ] -}; +}); |