conditional update download csv for staging & prod
This commit is contained in:
@ -2,13 +2,22 @@ import { fileURLToPath, URL } from 'node:url';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import { defineConfig, loadEnv } from 'vite';
|
||||
import tailwindcss from 'tailwindcss';
|
||||
|
||||
export default ({ mode }) => {
|
||||
process.env = { ...process.env, ...loadEnv(mode, process.cwd()) };
|
||||
const env = loadEnv(mode, process.cwd(), '');
|
||||
|
||||
return defineConfig({
|
||||
base: process.env.VITE_BASE_URL || '/',
|
||||
base: env.VITE_BASE_URL || '/',
|
||||
plugins: [react()],
|
||||
css: { postcss: { plugins: [tailwindcss()] } },
|
||||
resolve: { alias: { '@': fileURLToPath(new URL('./src', import.meta.url)) } },
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url))
|
||||
}
|
||||
},
|
||||
define: {
|
||||
'import.meta.env.VITE_BASE_URL': JSON.stringify(env.VITE_BASE_URL)
|
||||
},
|
||||
build: { chunkSizeWarningLimit: 3000 }
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user