mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-11-08 17:12:25 +05:30
Снова починил hmr для реакта :)
This commit is contained in:
parent
86f046fdab
commit
e2598883f7
2
.babelrc
2
.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"]
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user