Vue2系列:vue.config.js 配置记录

179 阅读1分钟

打包配置

 pages: {
  index: {
    entry: "src/products/offline-deploy/main.js", // 入口
    // template: "src/apps/deploy/index.html",
    filename: "index.html",
    title: "XXX // 页签名称
    favicon: path.resolve("src/assets/favicon.ico"), // 图标
  },
},
indexPath: "auth.html", // 打包出来的index.html别名
outputDir: "dist/XXXXX/, // 打包路径
assetsDir: "lib",

插件配置

configureWebpack: (config) => {
     config.plugins = [.....]
}

image.png