Skip to content

Commit

Permalink
chore: switch mode in dev and prod
Browse files Browse the repository at this point in the history
  • Loading branch information
alan890104 committed Apr 29, 2023
1 parent de9d7ca commit c8fac7f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const routes = [
];

const router = createRouter({
history: createWebHistory(),
history: createWebHistory(process.env.NODE_ENV === 'production' ? "/sharex-interface/" : "./"),
routes
});

Expand Down
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default defineConfig({
build: {
target: "es2022",
},
base: "/sharex-interface/",
base: process.env.NODE_ENV === 'production' ? "/sharex-interface/" : "./",
optimizeDeps: {
esbuildOptions: {
target: "es2022",
Expand Down

0 comments on commit c8fac7f

Please sign in to comment.