Files
website-products/products/react-apps/alisurvey/vite.config.ts
hsueh chiahao 8dd1e3c34f fix base url
2025-09-26 18:14:53 +08:00

21 lines
511 B
TypeScript

/** WARNING: DON'T EDIT THIS FILE */
/** WARNING: DON'T EDIT THIS FILE */
/** WARNING: DON'T EDIT THIS FILE */
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import tsconfigPaths from "vite-tsconfig-paths";
function getPlugins() {
const plugins = [react(), tsconfigPaths()];
return plugins;
}
export default defineConfig(({ command }) => ({
plugins: getPlugins(),
base: command === 'build'
? '/wp-content/products/react-apps/alisurvey/'
: '/alisurvey'
}));