lume/vite.config.ts

21 lines
503 B
TypeScript
Raw Normal View History

2023-04-22 01:53:18 +00:00
import react from '@vitejs/plugin-react-swc';
import { defineConfig } from 'vite';
import ssr from 'vite-plugin-ssr/plugin';
2023-04-23 05:15:04 +00:00
import topLevelAwait from 'vite-plugin-top-level-await';
2023-04-22 01:53:18 +00:00
import viteTsconfigPaths from 'vite-tsconfig-paths';
export default defineConfig({
2023-04-23 05:15:04 +00:00
plugins: [
react(),
ssr({ prerender: true }),
viteTsconfigPaths(),
topLevelAwait({
promiseExportName: '__tla',
promiseImportName: (i) => `__tla_${i}`,
}),
],
2023-04-23 01:25:27 +00:00
define: {
2023-04-23 02:56:31 +00:00
global: 'window',
2023-04-23 01:25:27 +00:00
},
2023-04-22 01:53:18 +00:00
});