2018-09-26 21:16:35 -04:00
|
|
|
const path = require('path');
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.jsx?$/,
|
|
|
|
loader: 'babel-loader',
|
2018-09-27 15:13:26 -04:00
|
|
|
resolve: {
|
|
|
|
symlinks: false
|
|
|
|
},
|
|
|
|
include: [
|
|
|
|
path.resolve(__dirname, 'src', 'renderer'),
|
|
|
|
/node_modules[\\/]scratch-[^\\/]+[\\/]src/
|
|
|
|
],
|
2018-09-26 21:16:35 -04:00
|
|
|
options: {
|
|
|
|
// Explicitly disable babelrc so we don't catch various config
|
|
|
|
// in much lower dependencies.
|
|
|
|
babelrc: false,
|
2018-09-27 15:13:26 -04:00
|
|
|
cacheDirectory: true,
|
2018-09-26 21:16:35 -04:00
|
|
|
plugins: [
|
2018-09-27 15:13:26 -04:00
|
|
|
'@babel/proposal-object-rest-spread',
|
2018-09-26 21:16:35 -04:00
|
|
|
// 'syntax-dynamic-import',
|
|
|
|
// 'transform-async-to-generator',
|
2018-09-27 15:13:26 -04:00
|
|
|
['react-intl', {
|
|
|
|
messagesDir: './translations/messages/'
|
|
|
|
}]
|
2018-09-26 21:16:35 -04:00
|
|
|
],
|
|
|
|
presets: [
|
2018-09-27 15:13:26 -04:00
|
|
|
['@babel/env', {targets: {electron: '2.0.7'}}],
|
2018-09-26 21:16:35 -04:00
|
|
|
'@babel/react'
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
};
|