Skip to content

Commit

Permalink
Only ship sourcemaps in dev builds (duckduckgo#2110)
Browse files Browse the repository at this point in the history
  • Loading branch information
sammacbeth authored Jul 13, 2023
1 parent 9b58e99 commit 970b3eb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,11 @@ BROWSERIFY_GLOBAL_TARGETS += $(shell find node_modules/@duckduckgo/ -maxdepth 1

BROWSERIFY_BIN = node_modules/.bin/browserify
BROWSERIFY = $(BROWSERIFY_BIN) -t babelify -t [ babelify --global --only [ $(BROWSERIFY_GLOBAL_TARGETS) ] --plugins [ "./scripts/rewrite-meta" ] --presets [ @babel/preset-env ] ]
ESBUILD = node_modules/.bin/esbuild --bundle --target=firefox91,chrome92 --define:BUILD_TARGET=\"$(browser)\" --sourcemap
ESBUILD = node_modules/.bin/esbuild --bundle --target=firefox91,chrome92 --define:BUILD_TARGET=\"$(browser)\"
# Ensure sourcemaps are included for the bundles during development.
ifeq ($(type),dev)
BROWSERIFY += -d
ESBUILD += --sourcemap
endif

## Extension background/serviceworker script.
Expand Down

0 comments on commit 970b3eb

Please sign in to comment.