mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-12-27 15:30:37 +05:30
Вынес конфиг бабеля в .babelrc
This commit is contained in:
parent
934afafce4
commit
78ccd3a756
9
.babelrc
Normal file
9
.babelrc
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"presets": ["react", "es2015", "stage-0"],
|
||||||
|
"plugins": ["transform-runtime", ["react-intl", {messagesDir: "./dist/messages/"}]],
|
||||||
|
"env": {
|
||||||
|
"development": {
|
||||||
|
"presets": ["react-hmre"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -28,6 +28,8 @@ 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');
|
||||||
|
|
||||||
const API_HOST = 'http://account.l';
|
const API_HOST = 'http://account.l';
|
||||||
const CSS_CLASS_TEMPLATE = isProduction ? '[hash:base64:5]' : '[path][name]-[local]';
|
const CSS_CLASS_TEMPLATE = isProduction ? '[hash:base64:5]' : '[path][name]-[local]';
|
||||||
|
|
||||||
@ -77,9 +79,7 @@ var webpackConfig = {
|
|||||||
plugins: [
|
plugins: [
|
||||||
new iconfontImporter.Plugin(),
|
new iconfontImporter.Plugin(),
|
||||||
new webpack.DefinePlugin({
|
new webpack.DefinePlugin({
|
||||||
'process.env': {
|
'process.env.NODE_ENV': process.env.NODE_ENV,
|
||||||
NODE_ENV: JSON.stringify(isProduction ? 'production' : 'development')
|
|
||||||
},
|
|
||||||
__DEV__: !isProduction,
|
__DEV__: !isProduction,
|
||||||
__TEST__: isTest,
|
__TEST__: isTest,
|
||||||
__PROD__: isProduction
|
__PROD__: isProduction
|
||||||
@ -111,16 +111,7 @@ var webpackConfig = {
|
|||||||
{
|
{
|
||||||
test: /\.jsx?$/,
|
test: /\.jsx?$/,
|
||||||
exclude: /node_modules/,
|
exclude: /node_modules/,
|
||||||
loader: 'babel',
|
loader: 'babel'
|
||||||
query: {
|
|
||||||
presets: ['react', 'es2015', 'stage-0'],
|
|
||||||
plugins: ['transform-runtime', ['react-intl', {messagesDir: './dist/messages/'}]],
|
|
||||||
env: {
|
|
||||||
development: {
|
|
||||||
presets: ['react-hmre']
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user