const { resolve } = require('path') const moment = require('moment') const { defineConfig } = require('@vue/cli-service') module.exports = defineConfig({ transpileDependencies: [/node_modules/], productionSourceMap: false, // 打包取消.map publicPath: './', pages: { indexPath: { entry: process.env.VUE_APP_ROOT + 'main.ts', template: process.env.VUE_APP_ROOT + 'index.html', filename: 'index.html', title: process.env.VUE_APP_TITLE, meta: { revised: moment(new Date()).format('YYYYMMDDHHmmss') // 打包生成版本号 } } }, chainWebpack: (config) => { config.resolve.alias .set('@' + process.env.VUE_APP_ENV, resolve(__dirname, process.env.VUE_APP_ROOT)) } })