2017-09-21 11:54:41 -04:00
|
|
|
const path = require('path');
|
|
|
|
|
|
|
|
module.exports = {
|
2018-05-07 14:33:47 -04:00
|
|
|
mode: process.env.NODE_ENV === 'production' ? 'production' : 'development',
|
2017-09-21 11:54:41 -04:00
|
|
|
devtool: 'cheap-module-source-map',
|
|
|
|
module: {
|
|
|
|
rules: [{
|
|
|
|
test: /\.js$/,
|
2018-11-25 18:05:44 -05:00
|
|
|
include: path.resolve(__dirname, 'src'),
|
|
|
|
use: {
|
|
|
|
loader: 'babel-loader',
|
|
|
|
options: {
|
|
|
|
presets: ['@babel/preset-env'],
|
|
|
|
plugins: [
|
|
|
|
'@babel/plugin-proposal-object-rest-spread',
|
|
|
|
'@babel/plugin-syntax-dynamic-import',
|
|
|
|
'@babel/plugin-transform-async-to-generator'
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
2017-09-21 11:54:41 -04:00
|
|
|
}]
|
|
|
|
},
|
|
|
|
entry: {
|
|
|
|
l10n: './src/index.js'
|
|
|
|
},
|
|
|
|
output: {
|
|
|
|
path: path.resolve(__dirname, 'dist'),
|
|
|
|
filename: '[name].js',
|
|
|
|
libraryTarget: 'commonjs2'
|
|
|
|
}
|
|
|
|
};
|