Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
蒋秀川
/
miniProject
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 526af74e
authored
Jun 04, 2025
by
Tianqing Liu
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat: 优化请求地址前缀
1 parent
ce60674a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
h5/src/router/index.js
h5/vite.config.js
h5/src/router/index.js
View file @
526af74
...
@@ -20,9 +20,10 @@ const routes = [
...
@@ -20,9 +20,10 @@ const routes = [
},
},
];
];
const
isDev
=
process
.
env
.
NODE_ENV
===
"development"
;
//
const isDev = process.env.NODE_ENV === "development";
const
router
=
createRouter
({
const
router
=
createRouter
({
history
:
createWebHistory
(
!
isDev
?
"/appH5/"
:
""
),
// history: createWebHistory(!isDev ? "/apph5/" : ""),
history
:
createWebHistory
(
'/apph5/'
),
routes
,
routes
,
});
});
...
...
h5/vite.config.js
View file @
526af74
...
@@ -16,7 +16,7 @@ const loder_pxtovw = pxtovw({
...
@@ -16,7 +16,7 @@ const loder_pxtovw = pxtovw({
import
path
from
"path"
;
import
path
from
"path"
;
import
copy
from
"rollup-plugin-copy"
;
import
copy
from
"rollup-plugin-copy"
;
export
default
defineConfig
({
export
default
defineConfig
({
base
:
"/app
H
5/"
,
base
:
"/app
h
5/"
,
publicDir
:
"public"
,
publicDir
:
"public"
,
server
:
{
server
:
{
host
:
true
,
host
:
true
,
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment