Permalink
Browse files

Replace process env only in prod

  • Loading branch information...
bkazi committed Sep 6, 2017
1 parent d3e10eb commit 5b7070700fca6f60b78cefb62dcfb068f22bf205
Showing with 3 additions and 3 deletions.
  1. +3 −3 rollup.config.js
View
@@ -47,10 +47,10 @@ const plugins = [
commonjs({
ignoreGlobal: true,
}),
replace({
prod && replace({
'process.env.NODE_ENV': JSON.stringify(prod ? 'production' : 'development'),
}),
inject({
prod && inject({
process: processShim,
}),
babel({
@@ -68,7 +68,7 @@ const plugins = [
'transform-class-properties',
].filter(Boolean),
}),
]
].filter(Boolean)
if (prod) plugins.push(uglify(), visualizer({ filename: './bundle-stats.html' }))

0 comments on commit 5b70707

Please sign in to comment.