2021-07-16 16:41:58 +02:00
|
|
|
const path = require('path');
|
|
|
|
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
|
|
|
|
|
|
|
/** @type {import('webpack').Configuration} */
|
|
|
|
module.exports = {
|
|
|
|
entry: './lib/web2d.js',
|
|
|
|
output: {
|
|
|
|
path: path.resolve(__dirname, 'dist'),
|
|
|
|
filename: '[name].js',
|
|
|
|
publicPath: '',
|
|
|
|
},
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
2021-10-05 01:56:40 +02:00
|
|
|
use: ["babel-loader", "eslint-loader"],
|
|
|
|
test: /.(js)$/,
|
2021-07-16 16:41:58 +02:00
|
|
|
exclude: /node_modules/,
|
2021-10-05 01:56:40 +02:00
|
|
|
}
|
2021-07-16 16:41:58 +02:00
|
|
|
],
|
|
|
|
},
|
2021-10-03 05:29:24 +02:00
|
|
|
target: 'web',
|
2021-07-16 16:41:58 +02:00
|
|
|
resolve: {
|
2021-10-05 01:56:40 +02:00
|
|
|
extensions: ['.js','.json'],
|
2021-07-16 16:41:58 +02:00
|
|
|
},
|
|
|
|
plugins: [new CleanWebpackPlugin()],
|
|
|
|
};
|