2021-07-16 11:41:58 -03:00
|
|
|
const path = require('path');
|
|
|
|
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
|
|
|
|
|
|
|
module.exports = {
|
2021-10-04 17:05:34 -07:00
|
|
|
output: {
|
|
|
|
path: path.resolve(__dirname, 'dist'),
|
2021-12-18 14:55:01 -08:00
|
|
|
filename: 'web2d.js',
|
2021-10-04 17:05:34 -07:00
|
|
|
publicPath: '',
|
2021-12-02 00:41:56 +00:00
|
|
|
library: {
|
|
|
|
type: 'umd',
|
|
|
|
},
|
2021-10-04 17:05:34 -07:00
|
|
|
},
|
2021-12-19 18:46:47 -08:00
|
|
|
optimization: {
|
|
|
|
usedExports: true,
|
|
|
|
},
|
2021-10-04 17:05:34 -07:00
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
2021-12-20 20:54:31 +00:00
|
|
|
use: ['babel-loader'],
|
2021-10-04 17:05:34 -07:00
|
|
|
test: /.(js)$/,
|
2022-07-12 18:58:11 -07:00
|
|
|
exclude: [/node_modules/],
|
2021-12-02 00:41:56 +00:00
|
|
|
},
|
2021-10-04 17:05:34 -07:00
|
|
|
],
|
|
|
|
},
|
|
|
|
plugins: [new CleanWebpackPlugin()],
|
2021-07-16 11:41:58 -03:00
|
|
|
};
|