Skip to content

Commit

Permalink
chore: change build npm script use babel-plugin-transform-inline-en…
Browse files Browse the repository at this point in the history
…vironment-variables
  • Loading branch information
59naga committed Mar 6, 2016
1 parent fa934e9 commit db6b9c0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
9 changes: 8 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,12 @@
"plugins": [
"transform-function-bind",
"add-module-exports"
]
],
"env": {
"production": {
"plugins": [
"transform-inline-environment-variables"
]
}
}
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,16 @@
"babel-loader": "^6.2.4",
"babel-plugin-add-module-exports": "^0.1.2",
"babel-plugin-transform-function-bind": "^6.5.2",
"babel-plugin-transform-inline-environment-variables": "^6.5.0",
"babel-preset-es2015": "^6.6.0",
"babel-preset-react": "^6.5.0",
"css-loader": "^0.23.1",
"eslint": "^2.3.0",
"eslint-config-airbnb": "^6.1.0",
"eslint-plugin-react": "^4.2.0",
"estraverse-fb": "^1.3.1",
"npm-run-all": "^1.5.1",
"material-ui": "^0.15.0-alpha.1",
"npm-run-all": "^1.5.1",
"object-assign": "^4.0.1",
"react": "^0.14.7",
"react-dom": "^0.14.7",
Expand Down
1 change: 1 addition & 0 deletions webpack.config.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const config = {

switch (process.env.npm_lifecycle_event) {
case 'build':
process.env.NODE_ENV = 'production';
config.plugins = [
new webpack.optimize.UglifyJsPlugin({ compress: { warnings: false } }),
];
Expand Down

0 comments on commit db6b9c0

Please sign in to comment.