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: {
|
2021-06-16 10:20:34 -04:00
|
|
|
l10n: './src/index.js',
|
|
|
|
supportedLocales: './src/supported-locales.js',
|
2021-05-28 16:52:46 -04:00
|
|
|
localeData: './src/locale-data.js'
|
2017-09-21 11:54:41 -04:00
|
|
|
},
|
|
|
|
output: {
|
|
|
|
path: path.resolve(__dirname, 'dist'),
|
|
|
|
filename: '[name].js',
|
|
|
|
libraryTarget: 'commonjs2'
|
|
|
|
}
|
|
|
|
};
|