2017-08-19 01:25:18 +00:00
|
|
|
module.exports = {
|
|
|
|
type: 'react-app',
|
|
|
|
|
|
|
|
babel: {
|
|
|
|
loose: false,
|
|
|
|
presets: [
|
|
|
|
'babel-preset-env',
|
|
|
|
],
|
|
|
|
plugins: [
|
|
|
|
'babel-plugin-transform-class-properties',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
|
|
|
|
webpack: {
|
2017-08-19 14:49:02 +00:00
|
|
|
aliases: {
|
|
|
|
'moment-timezone': 'moment-timezone/builds/moment-timezone-with-data-2012-2022.js',
|
|
|
|
},
|
|
|
|
|
2017-08-19 01:25:18 +00:00
|
|
|
autoprefixer: '> 1%, last 2 versions, Firefox ESR, ios >= 8',
|
|
|
|
|
|
|
|
extra: {
|
|
|
|
resolve: {
|
|
|
|
extensions: [
|
|
|
|
'.jsx',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
publicPath: '',
|
|
|
|
|
|
|
|
rules: {
|
|
|
|
babel: {
|
|
|
|
test: /\.jsx?/,
|
|
|
|
},
|
|
|
|
'sass-css': {
|
|
|
|
modules: true,
|
|
|
|
localIdentName: '[name]__[local]__[hash:base64:5]',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
2017-08-19 16:55:01 +00:00
|
|
|
|
|
|
|
// @HACK - workaround for https://github.com/webpack/webpack/issues/1866
|
|
|
|
|
|
|
|
function batchresolve(arr) {
|
|
|
|
return arr.map(require.resolve);
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports.babel.presets = batchresolve(module.exports.babel.presets);
|
|
|
|
module.exports.babel.plugins = batchresolve(module.exports.babel.plugins);
|
|
|
|
|