fix: support top level await on the server

This commit is contained in:
Aarnav Tale 2024-05-30 11:41:36 -04:00
parent faa583bb38
commit 57f045eaf6
No known key found for this signature in database

View File

@ -6,8 +6,9 @@ import tsconfigPaths from 'vite-tsconfig-paths'
installGlobals() installGlobals()
export default defineConfig({ export default defineConfig(({ isSsrBuild }) => ({
base: '/admin/', base: '/admin/',
build: isSsrBuild ? { target: 'ES2022' } : {},
plugins: [ plugins: [
remix({ remix({
basename: '/admin/', basename: '/admin/',
@ -23,4 +24,4 @@ export default defineConfig({
}, },
}), }),
], ],
}) }))