mirror of
https://github.com/urbit/shrub.git
synced 2024-12-22 02:11:38 +03:00
34 lines
797 B
TypeScript
34 lines
797 B
TypeScript
import { defineConfig } from 'vite';
|
|
import analyze from 'rollup-plugin-analyzer';
|
|
import { visualizer } from 'rollup-plugin-visualizer';
|
|
import reactRefresh from '@vitejs/plugin-react-refresh';
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig(({ mode }) => ({
|
|
base: mode === 'mock' ? undefined : '/apps/grid/',
|
|
server:
|
|
mode === 'mock'
|
|
? undefined
|
|
: {
|
|
proxy: {
|
|
'^((?!/apps/grid).)*$': {
|
|
target: 'http://localhost:8083'
|
|
}
|
|
}
|
|
},
|
|
build:
|
|
mode !== 'profile'
|
|
? undefined
|
|
: {
|
|
rollupOptions: {
|
|
plugins: [
|
|
analyze({
|
|
limit: 20
|
|
}),
|
|
visualizer()
|
|
]
|
|
}
|
|
},
|
|
plugins: [reactRefresh()]
|
|
}));
|