scratch-l10n/webpack.config.js
Michael "Z" Goddard c713d02ee1
Update to webpack 4
2018-05-07 14:38:02 -04:00

21 lines
522 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$/,
loader: 'babel-loader',
include: path.resolve(__dirname, 'src')
}]
},
entry: {
l10n: './src/index.js'
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: '[name].js',
libraryTarget: 'commonjs2'
}
};