scratch-l10n/webpack.config.js

34 lines
1,014 B
JavaScript
Raw Normal View History

const path = require('path');
module.exports = {
2018-05-07 14:33:47 -04:00
mode: process.env.NODE_ENV === 'production' ? 'production' : 'development',
devtool: 'cheap-module-source-map',
module: {
rules: [{
test: /\.js$/,
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'
]
}
}
}]
},
entry: {
2024-10-28 17:29:23 -04:00
l10n: './src/index.mjs',
supportedLocales: './src/supported-locales.mjs',
localeData: './src/locale-data.mjs'
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: '[name].js',
libraryTarget: 'commonjs2'
}
};