Skip to content

Commit

Permalink
Merge pull request #15 from sytranvn/webpack-prod-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
dutiyesh committed Oct 13, 2021
2 parents 7f54be8 + 262107a commit e2df8d5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
1 change: 0 additions & 1 deletion config/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const common = {
// the filename template for entry chunks
filename: '[name].js',
},
devtool: 'source-map',
stats: {
all: false,
errors: true,
Expand Down
3 changes: 2 additions & 1 deletion templates/devtools/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ const common = require('./webpack.common.js');
const PATHS = require('./paths');

// Merge webpack configuration files
const config = merge(common, {
const config = (env, argv) => merge(common, {
entry: {
devtools: PATHS.src + '/devtools.js',
panel: PATHS.src + '/panel.js',
background: PATHS.src + '/background.js',
},
devtool: argv.mode === 'production' ? false : 'source-map'
});

module.exports = config;
3 changes: 2 additions & 1 deletion templates/override-page/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ const common = require('./webpack.common.js');
const PATHS = require('./paths');

// Merge webpack configuration files
const config = merge(common, {
const config = (env, argv) => merge(common, {
entry: {
app: PATHS.src + '/app.js',
background: PATHS.src + '/background.js',
},
devtool: argv.mode === 'production' ? false : 'source-map'
});

module.exports = config;
3 changes: 2 additions & 1 deletion templates/popup/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ const common = require('./webpack.common.js');
const PATHS = require('./paths');

// Merge webpack configuration files
const config = merge(common, {
const config = (env, argv) => merge(common, {
entry: {
popup: PATHS.src + '/popup.js',
contentScript: PATHS.src + '/contentScript.js',
background: PATHS.src + '/background.js',
},
devtool: argv.mode === 'production' ? false : 'source-map'
});

module.exports = config;

0 comments on commit e2df8d5

Please sign in to comment.