配置vue3
项目只需要改动两个文件,vue.config.js
与route/index.js
vue.config.js
const webpack = require("webpack");
module.exports = {
publicPath: process.env.NODE_ENV === 'production' ? '/test' : '/',
};
route/index.js
export const constantRoutes = [];
import {createRouter, createWebHistory} from 'vue-router'
const router = createRouter({
history:createWebHistory('/test/'),
routes
评论(0)