Browse Source

打包配置

sbj 2 years ago
parent
commit
488d1bd54a
2 changed files with 3 additions and 2 deletions
  1. 1 1
      src/router/index.js
  2. 2 1
      vue.config.js

+ 1 - 1
src/router/index.js

@@ -47,7 +47,7 @@ export const defaultRoutes = [
 
 const router = createRouter({
   routes:defaultRoutes,
- 
+  base: '/ghjg-digital-twin', // 打包发布时Tomcat中webapp下的项目路径
   history:createWebHashHistory()
  
 })

+ 2 - 1
vue.config.js

@@ -2,5 +2,6 @@ const { defineConfig } = require('@vue/cli-service')
 
 module.exports = defineConfig({
   transpileDependencies: true,
-  lintOnSave:false
+  lintOnSave:false,
+  publicPath: '/ghjg-digital-twin', //打包发布用
 })