From aa49bc3e9348cf106dc9a60de2b7afd6c22393e3 Mon Sep 17 00:00:00 2001 From: 1ilsang <1ilsang@naver.com> Date: Sun, 20 Aug 2023 10:39:05 +0900 Subject: [PATCH] feat: fix router --- vite.config.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vite.config.ts b/vite.config.ts index ac37bb9..a5ed082 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,9 +1,12 @@ import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; +import { homepage } from './package.json'; + // https://vitejs.dev/config/ export default defineConfig(({ mode }) => { return { plugins: [react()], + base: mode === 'production' ? homepage : '/', }; });