-
Notifications
You must be signed in to change notification settings - Fork 9
/
webpack.config.js
33 lines (32 loc) · 953 Bytes
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// @ts-nocheck
const path = require("path");
const { VueLoaderPlugin } = require('vue-loader');
module.exports = function (env, argv) {
return {
context: path.join(__dirname, "./client"),
resolve: {
extensions: [".ts", ".js", '.vue'],
alias: {
'vue$': 'vue/dist/vue.esm.js'
}
},
entry: {
main: "./main"
},
output: {
publicPath: "/",
path: path.join(__dirname, "./wwwroot"),
filename: argv.mode === 'production' ? "[name].build.min.js" : "[name].build.js"
},
plugins: [
new VueLoaderPlugin()
],
module: {
rules: [
{ test: /\.(ts|js)$/, use: { loader: "ts-loader", options: { appendTsSuffixTo: [/\.vue$/] } }, exclude: /node_modules/ },
{ test: /\.vue$/, loader: 'vue-loader', options: { esModule: true, loaders: {} } },
{ test: /\.html$/, use: [{ loader: 'html-loader', options: { minimize: false } }] }
]
}
};
};