mirror of
https://github.com/scratchfoundation/scratch-l10n.git
synced 2024-12-21 21:22:31 -05:00
e563259149
Add new index.js that re-exports the locale-data and supported-locales so that dependents of scratch-l10n can continue to work without changing. (With corresponding changes in webpack.config.js and package.json.)
33 lines
1,011 B
JavaScript
33 lines
1,011 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.js',
|
|
localeData: './src/locale-data.js'
|
|
},
|
|
output: {
|
|
path: path.resolve(__dirname, 'dist'),
|
|
filename: '[name].js',
|
|
libraryTarget: 'commonjs2'
|
|
}
|
|
};
|