ulogger-server/webpack.common.js
2019-12-30 14:01:27 +01:00

27 lines
552 B
JavaScript

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/'
},
plugins: [
new CleanWebpackPlugin({
cleanOnceBeforeBuildPatterns: [ '**/*', '!.*' ]
})
],
optimization: {
splitChunks: {
cacheGroups: {
vendors: {
test: /[\\/]node_modules[\\/]|[\\/]ol.js/,
name: 'ol'
}
}
}
}
};