mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-12-29 00:10:54 +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"],
|
"presets": ["react", "es2015", "stage-0"],
|
||||||
"plugins": ["transform-runtime", ["react-intl", {messagesDir: "./dist/messages/"}]],
|
"plugins": ["transform-runtime", ["react-intl", {"messagesDir": "./dist/messages/"}]],
|
||||||
"env": {
|
"env": {
|
||||||
"development": {
|
"development": {
|
||||||
"presets": ["react-hmre"]
|
"presets": ["react-hmre"]
|
||||||
|
@ -28,7 +28,7 @@ var isTest = process.argv.some(function(arg) {
|
|||||||
return arg.indexOf('karma') !== -1;
|
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]';
|
const CSS_CLASS_TEMPLATE = isProduction ? '[hash:base64:5]' : '[path][name]-[local]';
|
||||||
var config;
|
var config;
|
||||||
@ -95,7 +95,9 @@ var webpackConfig = {
|
|||||||
plugins: [
|
plugins: [
|
||||||
new iconfontImporter.Plugin(),
|
new iconfontImporter.Plugin(),
|
||||||
new webpack.DefinePlugin({
|
new webpack.DefinePlugin({
|
||||||
'process.env.NODE_ENV': process.env.NODE_ENV,
|
'process.env': {
|
||||||
|
NODE_ENV: JSON.stringify(process.env.NODE_ENV)
|
||||||
|
},
|
||||||
__DEV__: !isProduction,
|
__DEV__: !isProduction,
|
||||||
__TEST__: isTest,
|
__TEST__: isTest,
|
||||||
__PROD__: isProduction
|
__PROD__: isProduction
|
||||||
|
Loading…
Reference in New Issue
Block a user