Снова починил hmr для реакта :)

This commit is contained in:
SleepWalker 2016-02-13 11:05:21 +02:00
parent 86f046fdab
commit e2598883f7
2 changed files with 5 additions and 3 deletions

View File

@ -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"]

View File

@ -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