Skip to content

Commit 853b39e

Browse files
committed
use source maps when --debug arg is passed
1 parent 9f0e6c8 commit 853b39e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,11 @@ module.exports = (api, options) => {
209209
.node.set('__dirname', false)
210210
.set('__filename', false)
211211
mainConfig.output.path(api.resolve(outputDir)).filename('background.js')
212-
if (!args.debug) {
212+
if (args.debug) {
213+
// Enable source maps for debugging
214+
mainConfig.devtool('source-map')
215+
} else {
216+
// Minify for better performance
213217
mainConfig.plugin('uglify').use(UglifyJSPlugin, [
214218
{
215219
parallel: true

0 commit comments

Comments
 (0)