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.
23 lines
492 B
23 lines
492 B
const { merge } = require("webpack-merge");
|
|
const path = require('path')
|
|
const defaultConfig = require("./webpack.config");
|
|
|
|
module.exports = merge(defaultConfig, {
|
|
// 压缩代码
|
|
optimization: {
|
|
minimize: true
|
|
},
|
|
|
|
// 实时编译
|
|
watch: true,
|
|
|
|
// 指定入口文件
|
|
entry: "./src/index.ts",
|
|
|
|
// 指定打包文件所在目录
|
|
output: {
|
|
path: path.resolve('dist'),
|
|
// 打包后文件的名称
|
|
filename: "index.js"
|
|
}
|
|
})
|
|
|