ulogger-server/webpack.common.js

27 lines
552 B
JavaScript
Raw Normal View History

2019-11-29 16:53:50 +01:00
const path = require('path');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
module.exports = {
entry: './js/src/ulogger.js',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'js/dist'),
publicPath: 'js/dist/'
},
2019-12-30 14:01:27 +01:00
plugins: [
new CleanWebpackPlugin({
cleanOnceBeforeBuildPatterns: [ '**/*', '!.*' ]
})
],
2019-11-29 16:53:50 +01:00
optimization: {
splitChunks: {
cacheGroups: {
vendors: {
test: /[\\/]node_modules[\\/]|[\\/]ol.js/,
name: 'ol'
}
}
}
}
};