123456789101112131415161718192021222324252627 |
- const { defineConfig } = require('@vue/cli-service')
- module.exports = defineConfig({
- transpileDependencies: true,
-
- //基本路径
- publicPath: './', //默认的'/'是绝对路径,如果不确定在根路径,改成相对路径'./'
- // 输出文件目录
- outputDir: 'dist',
- //endOfLine: 'auto',
- lintOnSave: false,
-
- devServer: {
- port: 8087, // 端口
- open: false, //自动在浏览器中打开
- proxy: {
- '/api': {
- target: 'http://localhost:5239/api',
- //target: "http://dhiot.teruishuo.com/api",
- changeOrigin: true, //是否跨域,肯定true
- pathRewrite: { //重写请求中的/api为空
- '^/api': ''
- }
- },
- }
- },
-
- })
|