From 2e7c97acb09370d75d7d791e72547e9f500ad2e1 Mon Sep 17 00:00:00 2001 From: Rayson Yeap <88478542+Respirayson@users.noreply.github.com> Date: Fri, 22 Dec 2023 22:21:54 +0800 Subject: [PATCH] Update vite.config.js --- vite.config.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/vite.config.js b/vite.config.js index e4bc166..03835ed 100644 --- a/vite.config.js +++ b/vite.config.js @@ -12,3 +12,21 @@ export default defineConfig({ }, } }) + +export default defineConfig(({ command }) => { + const config = { + plugins: [react()], + base: '/', + css: { + postcss: { + plugins: [tailwindcss()], + }, + } + } + + if (command !== 'serve') { + config.base = '/comclub-website-2024/' + } + + return config +})