Skip to content

Commit

Permalink
fix(build): replace process.env in builds (#429) (#435)
Browse files Browse the repository at this point in the history
  • Loading branch information
nathancahill authored and eddywashere committed May 16, 2017
1 parent 1ec0e6f commit fcc5264
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -141,6 +141,7 @@
"rollup-plugin-babili": "^3.0.0",
"rollup-plugin-commonjs": "^8.0.2",
"rollup-plugin-node-resolve": "^3.0.0",
"rollup-plugin-replace": "^1.1.1",
"static-site-generator-webpack-plugin": "^2.0.1",
"style-loader": "^0.13.1",
"webpack": "^1.12.13",
Expand Down
4 changes: 4 additions & 0 deletions rollup.config.js
Expand Up @@ -2,6 +2,7 @@ import nodeResolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import babel from 'rollup-plugin-babel';
import babili from 'rollup-plugin-babili';
import replace from 'rollup-plugin-replace';

const config = {
moduleName: 'Reactstrap',
Expand Down Expand Up @@ -32,6 +33,9 @@ const config = {

if (process.env.NODE_ENV === 'production') {
config.plugins.push(babili({ comments: false }));
config.plugins.push(replace({
'process.env.NODE_ENV': JSON.stringify('production'),
}));
}

export default config;

0 comments on commit fcc5264

Please sign in to comment.