You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.3 KiB
59 lines
1.3 KiB
const path = require("path")
|
|
|
|
const { CleanWebpackPlugin } = require("clean-webpack-plugin")
|
|
const { VueLoaderPlugin } = require('vue-loader');
|
|
|
|
module.exports = {
|
|
mode: "production",
|
|
resolve:{
|
|
alias: {
|
|
'vue': 'vue/dist/vue.js'
|
|
}
|
|
},
|
|
entry: {
|
|
main: './src/main.ts',
|
|
// login: './src/login.ts'
|
|
},
|
|
output: {
|
|
path: path.resolve(__dirname, "dist"),
|
|
filename: "[name].js"
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.ts$/,
|
|
include: [path.resolve(__dirname, "./src")],
|
|
use: [
|
|
{
|
|
loader: "babel-loader",
|
|
options: {
|
|
presets: [
|
|
"@babel/preset-env"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
loader: "ts-loader"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
test: /\.vue$/,
|
|
exclude: /node_modules/,
|
|
use: "vue-loader"
|
|
},
|
|
{
|
|
test: /\.less$/,
|
|
use: [
|
|
"style-loader",
|
|
"css-loader",
|
|
"less-loader"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
plugins: [
|
|
new VueLoaderPlugin()
|
|
]
|
|
};
|