mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
a6002d5f19
* refactor: produce br outputs * refactor: fix favicon url
22 lines
638 B
TypeScript
22 lines
638 B
TypeScript
import react from '@vitejs/plugin-react';
|
|
import { mergeConfig, defineConfig, type UserConfig } from 'vite';
|
|
import viteCompression from 'vite-plugin-compression';
|
|
|
|
import { defaultConfig } from '../../vite.shared.config';
|
|
|
|
const buildConfig = (mode: string): UserConfig => ({
|
|
base: '/demo-app',
|
|
server: {
|
|
port: 5003,
|
|
hmr: {
|
|
port: 6003,
|
|
},
|
|
},
|
|
plugins: [
|
|
react(),
|
|
viteCompression({ disable: mode === 'development' }),
|
|
viteCompression({ disable: mode === 'development', algorithm: 'brotliCompress' }),
|
|
],
|
|
});
|
|
|
|
export default defineConfig(({ mode }) => mergeConfig(defaultConfig, buildConfig(mode)));
|