mirror of
https://github.com/scratchfoundation/scratch-l10n.git
synced 2024-11-14 19:35:10 -05:00
44c4b97581
This should improve call stacks when debugging. BREAKING CHANGE: Some files have been renamed from '.js' to '.mjs'
33 lines
1,013 B
JavaScript
33 lines
1,013 B
JavaScript
const path = require('path');
|
|
|
|
module.exports = {
|
|
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: {
|
|
l10n: './src/index.js',
|
|
supportedLocales: './src/supported-locales.mjs',
|
|
localeData: './src/locale-data.mjs'
|
|
},
|
|
output: {
|
|
path: path.resolve(__dirname, 'dist'),
|
|
filename: '[name].js',
|
|
libraryTarget: 'commonjs2'
|
|
}
|
|
};
|