Skip to content

Commit 3b5a465

Browse files
committed
bugfix: build script
1 parent 162f6c1 commit 3b5a465

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

webpack.config.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,14 @@ const entry = {
1313
'popup/index': [ROOT + '/src/popup/index'],
1414
};
1515

16-
module.exports = {
16+
const config = {
1717
entry: entry,
1818
mode: mode,
1919
output: {
2020
path: ROOT + '/chrome',
2121
filename: '[name].bundle.js',
2222
sourceMapFilename: '[name].bundle.map.js',
2323
},
24-
devtool: 'cheap-module-source-map',
2524
module: {
2625
rules: [
2726
{
@@ -86,3 +85,9 @@ module.exports = {
8685
}),
8786
],
8887
};
88+
89+
if (mode === 'development') {
90+
config.devtool = 'cheap-module-source-map'
91+
}
92+
93+
module.exports = config;

0 commit comments

Comments
 (0)