mirror of
https://github.com/sunniejs/vue-h5-template.git
synced 2025-04-06 03:57:50 +08:00
Merge pull request #151 from Annunx/vue-h5-template
fix: 修复设置vite.config.js base选项构建页面路径不正确问题
This commit is contained in:
commit
6421aecf77
6
.vscode/settings.json
vendored
6
.vscode/settings.json
vendored
@ -84,12 +84,12 @@
|
|||||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||||
},
|
},
|
||||||
"editor.codeActionsOnSave": {
|
"editor.codeActionsOnSave": {
|
||||||
"source.fixAll.eslint": true
|
"source.fixAll.eslint": "explicit"
|
||||||
},
|
},
|
||||||
"[vue]": {
|
"[vue]": {
|
||||||
"editor.codeActionsOnSave": {
|
"editor.codeActionsOnSave": {
|
||||||
"source.fixAll.eslint": true,
|
"source.fixAll.eslint": "explicit",
|
||||||
"source.fixAll.stylelint": true
|
"source.fixAll.stylelint": "explicit"
|
||||||
},
|
},
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||||
},
|
},
|
||||||
|
@ -2,7 +2,7 @@ import { createRouter, createWebHistory, Router } from 'vue-router';
|
|||||||
import routes from './routes';
|
import routes from './routes';
|
||||||
|
|
||||||
const router: Router = createRouter({
|
const router: Router = createRouter({
|
||||||
history: createWebHistory('/'),
|
history: createWebHistory(import.meta.env.BASE_URL),
|
||||||
routes: routes,
|
routes: routes,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ export default function ({ command, mode }: ConfigEnv): UserConfig {
|
|||||||
const viteEnv = wrapperEnv(env);
|
const viteEnv = wrapperEnv(env);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
base: '/',
|
||||||
root,
|
root,
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: [
|
alias: [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user