Skip to content

Commit

Permalink
Fix Node-style process.env lines when bundling
Browse files Browse the repository at this point in the history
  • Loading branch information
eKoopmans committed May 19, 2018
1 parent 5c629ec commit acb0f3f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
11 changes: 11 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"rollup-plugin-babel": "^3.0.2",
"rollup-plugin-commonjs": "^8.2.6",
"rollup-plugin-node-resolve": "^3.0.0",
"rollup-plugin-replace": "^2.0.0",
"rollup-plugin-uglify": "^2.0.1"
},
"scripts": {
Expand Down
5 changes: 5 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Import dependencies.
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import replace from 'rollup-plugin-replace';
import babel from 'rollup-plugin-babel';
import uglify from 'rollup-plugin-uglify';
import pkg from './package.json';
Expand Down Expand Up @@ -41,6 +42,7 @@ export default [
plugins: [
resolve(),
commonjs(),
replace({ 'process.env.NODE_ENV': JSON.stringify('production') }),
babel({ exclude: 'node_modules/**' }),
banner()
]
Expand All @@ -64,6 +66,7 @@ export default [
plugins: [
resolve(),
commonjs(),
replace({ 'process.env.NODE_ENV': JSON.stringify('production') }),
babel({ exclude: 'node_modules/**' }),
uglify({
output: { preamble: banner().banner }
Expand All @@ -84,6 +87,7 @@ export default [
plugins: [
resolve(),
commonjs(),
replace({ 'process.env.NODE_ENV': JSON.stringify('production') }),
babel({ exclude: 'node_modules/**' }),
banner()
]
Expand All @@ -102,6 +106,7 @@ export default [
plugins: [
resolve(),
commonjs(),
replace({ 'process.env.NODE_ENV': JSON.stringify('production') }),
babel({ exclude: 'node_modules/**' }),
uglify({
output: { preamble: banner().banner }
Expand Down

0 comments on commit acb0f3f

Please sign in to comment.