0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00
logto/packages/demo-app/vite.config.ts

23 lines
638 B
TypeScript
Raw Normal View History

import react from '@vitejs/plugin-react';
import { mergeConfig, defineConfig, type UserConfig } from 'vite';
import viteCompression from 'vite-plugin-compression';
2024-07-23 01:52:45 -05:00
2024-07-24 04:47:02 -05:00
import { defaultConfig } from '../../vite.shared.config';
const buildConfig = (mode: string): UserConfig => ({
2024-07-23 01:52:45 -05:00
base: '/demo-app',
server: {
port: 5003,
hmr: {
port: 6003,
},
},
plugins: [
react(),
viteCompression({ disable: mode === 'development' }),
viteCompression({ disable: mode === 'development', algorithm: 'brotliCompress' }),
],
});
2024-07-23 01:52:45 -05:00
export default defineConfig(({ mode }) => mergeConfig(defaultConfig, buildConfig(mode)));