2021-10-23 11:11:03 +01:00
|
|
|
const path = require('path');
|
|
|
|
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
entry: {
|
2021-10-31 19:47:07 +00:00
|
|
|
now: './scripts/now.ts',
|
2021-11-09 22:47:49 +00:00
|
|
|
nowCss: './CSS/index.scss',
|
2021-10-23 11:11:03 +01:00
|
|
|
},
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.tsx?$/,
|
|
|
|
loader: 'ts-loader',
|
2021-11-09 18:17:22 +00:00
|
|
|
options: {
|
|
|
|
appendTsSuffixTo: [/\.vue$/],
|
|
|
|
},
|
2021-10-23 11:11:03 +01:00
|
|
|
exclude: /node_modules/,
|
2021-11-09 18:17:22 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.vue$/,
|
|
|
|
loader: 'vue-loader',
|
2021-11-09 22:47:49 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.scss$/,
|
|
|
|
exclude: /node_modules/,
|
|
|
|
use: [
|
|
|
|
{
|
|
|
|
loader: 'file-loader',
|
|
|
|
options: { outputPath: '../css', name: '[name].min.css'}
|
|
|
|
},
|
|
|
|
'sass-loader'
|
|
|
|
]
|
2021-10-23 11:11:03 +01:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
new CleanWebpackPlugin()
|
|
|
|
],
|
2021-11-09 18:17:22 +00:00
|
|
|
resolve: {
|
|
|
|
extensions: ["*", ".js", ".jsx", ".ts", ".tsx", ".vue"] ,
|
|
|
|
alias: {
|
|
|
|
vue: "vue/dist/vue.esm-bundler.js"
|
|
|
|
}
|
|
|
|
},
|
2021-10-23 11:11:03 +01:00
|
|
|
output: {
|
|
|
|
filename: '[name].bundle.js',
|
|
|
|
path: path.resolve(__dirname, 'wwwroot/js')
|
|
|
|
}
|
|
|
|
};
|