Skip to content

Commit

Permalink
seperate sourcemap from dist file
Browse files Browse the repository at this point in the history
  • Loading branch information
sayan-rudder committed May 28, 2020
1 parent 775ab0c commit 230e168
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"scripts": {
"test": "./scripts/run_tests.sh",
"buildDevBrowser": "NODE_ENV=false uglify=false rollup -c",
"buildProdBrowser": "NODE_ENV=false ENV=prod uglify=true rollup -c",
"buildProdBrowserDebug": "NODE_ENV=false ENV=prod PROD_DEBUG=true uglify=true rollup -c",
"buildProdBrowser": "NODE_ENV=false PROD_DEBUG=true ENV=prod uglify=true rollup -c",
"buildProdBrowserDebug": "NODE_ENV=false ENV=prod PROD_DEBUG_INLINE=true uglify=true rollup -c",
"buildProdBrowserGzip": "NODE_ENV=false ENV=prod ENC=gzip uglify=true rollup -c",
"buildProdBrowserBrotli": "NODE_ENV=false ENV=prod ENC=br uglify=true rollup -c",
"buildDevNode": "NODE_ENV=true uglify=false rollup -c",
Expand Down
8 changes: 4 additions & 4 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ switch (process.env.ENV) {
case "prod":
switch (process.env.ENC) {
case "gzip":
if(process.env.PROD_DEBUG == "true") {
if(process.env.PROD_DEBUG_INLINE == "true") {
distFileName = "dist/rudder-analytics-map.min.gzip.js"
} else {
distFileName = "dist/rudder-analytics.min.gzip.js"
}
break
case "br":
if(process.env.PROD_DEBUG == "true") {
if(process.env.PROD_DEBUG_INLINE == "true") {
distFileName = "dist/rudder-analytics-map.min.br.js"
} else {
distFileName = "dist/rudder-analytics.min.br.js"
}
break
default:
if(process.env.PROD_DEBUG == "true") {
if(process.env.PROD_DEBUG_INLINE == "true") {
distFileName = "dist/rudder-analytics-map.min.js"
} else {
distFileName = "dist/rudder-analytics.min.js"
Expand All @@ -51,7 +51,7 @@ if(process.env.NPM == "true") {
file: distFileName,
format: "iife",
name: "rudderanalytics",
sourcemap: process.env.PROD_DEBUG == 'true'? 'inline': false,
sourcemap: process.env.PROD_DEBUG_INLINE == 'true'? 'inline': process.env.PROD_DEBUG ? true : false,
})
}

Expand Down

0 comments on commit 230e168

Please sign in to comment.