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 : '/', }; });