2021-10-23 11:11:03 +01:00
|
|
|
const path = require('path');
|
|
|
|
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
entry: {
|
2021-10-23 22:16:37 +01:00
|
|
|
index: './scripts/index.ts',
|
2021-10-23 11:11:03 +01:00
|
|
|
},
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.tsx?$/,
|
|
|
|
loader: 'ts-loader',
|
|
|
|
exclude: /node_modules/,
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
new CleanWebpackPlugin()
|
|
|
|
],
|
|
|
|
resolve: { extensions: ["*", ".js", ".jsx", ".ts", ".tsx"] },
|
|
|
|
output: {
|
|
|
|
filename: '[name].bundle.js',
|
|
|
|
path: path.resolve(__dirname, 'wwwroot/js')
|
|
|
|
}
|
|
|
|
};
|