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: {
|
2024-10-28 17:29:23 -04:00
|
|
|
l10n: './src/index.mjs',
|
2024-10-28 13:41:37 -04:00
|
|
|
supportedLocales: './src/supported-locales.mjs',
|
|
|
|
localeData: './src/locale-data.mjs'
|
2017-09-21 11:54:41 -04:00
|
|
|
},
|
|
|
|
output: {
|
|
|
|
path: path.resolve(__dirname, 'dist'),
|
|
|
|
filename: '[name].js',
|
|
|
|
libraryTarget: 'commonjs2'
|
|
|
|
}
|
|
|
|
};
|