diff --git a/.babelrc b/.babelrc index 497116c..0afdcb9 100644 --- a/.babelrc +++ b/.babelrc @@ -1,6 +1,6 @@ { "presets": ["react", "es2015", "stage-0"], - "plugins": ["transform-runtime", ["react-intl", {messagesDir: "./dist/messages/"}]], + "plugins": ["transform-runtime", ["react-intl", {"messagesDir": "./dist/messages/"}]], "env": { "development": { "presets": ["react-hmre"] diff --git a/webpack.config.js b/webpack.config.js index 939908f..f1b4fe9 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -28,7 +28,7 @@ var isTest = process.argv.some(function(arg) { return arg.indexOf('karma') !== -1; }); -process.env.NODE_ENV = JSON.stringify(isProduction ? 'production' : 'development'); +process.env.NODE_ENV = isProduction ? 'production' : 'development'; const CSS_CLASS_TEMPLATE = isProduction ? '[hash:base64:5]' : '[path][name]-[local]'; var config; @@ -95,7 +95,9 @@ var webpackConfig = { plugins: [ new iconfontImporter.Plugin(), new webpack.DefinePlugin({ - 'process.env.NODE_ENV': process.env.NODE_ENV, + 'process.env': { + NODE_ENV: JSON.stringify(process.env.NODE_ENV) + }, __DEV__: !isProduction, __TEST__: isTest, __PROD__: isProduction