| 123456789101112131415161718192021222324252627 |
- const { defineConfig } = require('@vue/cli-service')
- module.exports = defineConfig({
- transpileDependencies: true,
- outputDir: 'dist',
- // 使用相对路径,便于将 dist 放入 Android assets 以 file:// 打开;同目录部署的 Spring 静态页也兼容
- publicPath: process.env.VUE_APP_PUBLIC_PATH != null && process.env.VUE_APP_PUBLIC_PATH !== ''
- ? process.env.VUE_APP_PUBLIC_PATH
- : './',
- devServer: {
- // 明确监听所有网卡,避免部分环境下仅 IPv6/本机名解析导致 localhost 拒绝连接
- host: '0.0.0.0',
- port: 8080,
- proxy: {
- '/api': {
- target: 'http://localhost:3381',
- changeOrigin: true
- }
- }
- },
- chainWebpack: config => {
- config.plugin('html').tap(args => {
- args[0].title = '甘肃省中医院'
- return args
- })
- }
- })
|