lrf402788946 hace 5 años
padre
commit
0e15a3af80
Se han modificado 2 ficheros con 4 adiciones y 1 borrados
  1. 2 0
      src/router/index.js
  2. 2 1
      vue.config.js

+ 2 - 0
src/router/index.js

@@ -13,6 +13,8 @@ const routes = [
 ];
 
 const router = new VueRouter({
+  mode: 'history',
+  base: process.env.NODE_ENV === 'development' ? '' : 'examine',
   routes,
 });
 

+ 2 - 1
vue.config.js

@@ -1,6 +1,7 @@
 const path = require('path');
 module.exports = {
-  publicPath: '/',
+  publicPath: process.env.NODE_ENV === 'development' ? '/' : 'examine',
+  outputDir: 'examine',
   configureWebpack: config => {
     Object.assign(config, {
       // 开发生产共同配置