const { defineConfig } = require('@vue/cli-service') module.exports = defineConfig({ transpileDependencies: true, lintOnSave: false, publicPath: process.env.VUE_APP_CDN, // 静态资源路径(默认/,打包后会白屏) assetsDir: 'static', productionSourceMap: false, outputDir: 'dist', // 打包后文件的目录 (默认为dist) devServer: { port: 8088, proxy: { // 可以设置多个 '/api':{ target:'https://www.novots.com/', // target:'http://10.1.2.71', // target:'http://j24rde.natappfree.cc', changeOrigin:true, pathRewrite:{ // '^/api': 'http://10.1.2.71' '^/api': '/' // '^/api': 'http://j24rde.natappfree.cc' } }, '/api':{ target:'https://www.novots.com/', // target:'http://10.1.2.71', // target:'http://j24rde.natappfree.cc', changeOrigin:true, pathRewrite:{ // '^/api': 'http://10.1.2.71' '^/api': '/' // '^/api': 'http://j24rde.natappfree.cc' } }, '/api':{ target:'https://www.novots.com/', // target:'http://10.1.2.71', // target:'http://j24rde.natappfree.cc', changeOrigin:true, pathRewrite:{ // '^/api': 'http://10.1.2.71' '^/api': '/' // '^/api': 'http://j24rde.natappfree.cc' } } } }, })