2021-10-03 04:52:56 +02:00
|
|
|
const path = require('path');
|
2021-12-02 01:41:56 +01:00
|
|
|
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
2021-07-16 16:41:58 +02:00
|
|
|
|
2021-09-23 19:25:22 +02:00
|
|
|
module.exports = {
|
2021-07-16 16:41:58 +02:00
|
|
|
output: {
|
2021-12-02 01:41:56 +01:00
|
|
|
path: path.resolve(__dirname, 'dist'),
|
2021-07-16 16:41:58 +02:00
|
|
|
filename: 'core.js',
|
|
|
|
publicPath: '',
|
2021-12-02 01:41:56 +01:00
|
|
|
library: {
|
|
|
|
type: 'umd',
|
2021-12-14 16:08:54 +01:00
|
|
|
}
|
2021-07-16 16:41:58 +02:00
|
|
|
},
|
2021-10-03 05:29:24 +02:00
|
|
|
target: 'web',
|
2021-12-20 03:46:47 +01:00
|
|
|
optimization: {
|
|
|
|
usedExports: true,
|
|
|
|
},
|
2021-07-16 16:41:58 +02:00
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
use: 'babel-loader',
|
2021-10-03 04:52:56 +02:00
|
|
|
test: /.js$/,
|
2021-12-02 01:41:56 +01:00
|
|
|
exclude: [
|
|
|
|
/node_modules/,
|
|
|
|
]
|
|
|
|
},
|
2021-07-16 16:41:58 +02:00
|
|
|
],
|
|
|
|
},
|
|
|
|
resolve: {
|
2021-10-03 04:52:56 +02:00
|
|
|
extensions: ['.js'],
|
2021-07-16 16:41:58 +02:00
|
|
|
},
|
2022-02-05 22:53:10 +01:00
|
|
|
plugins: [new CleanWebpackPlugin({
|
|
|
|
dangerouslyAllowCleanPatternsOutsideProject: true,
|
|
|
|
dry: false,
|
|
|
|
})],
|
2021-07-16 16:41:58 +02:00
|
|
|
};
|