Skip to content

Commit

Permalink
Fix tla native
Browse files Browse the repository at this point in the history
  • Loading branch information
TheUltDev committed Aug 25, 2024
1 parent b8a01ba commit a78a51d
Show file tree
Hide file tree
Showing 4 changed files with 156 additions and 10 deletions.
153 changes: 148 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions toolkit/bundler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"vite": "^5.3.5",
"vite-plugin-dts": "^3.9.1",
"vite-plugin-node-polyfills": "^0.22.0",
"vite-plugin-top-level-await": "^1.4.4",
"vite-tsconfig-paths": "^4.3.2",
"vocs": "1.0.0-alpha.50",
"yaml": "latest"
Expand Down
5 changes: 0 additions & 5 deletions toolkit/bundler/src/libs/exo.native.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ import react from '@vitejs/plugin-react';
export default defineConfig(env => mergeConfig(
nativeConfig(env),
defineConfig({
esbuild: {
supported: {
'top-level-await': true,
},
},
build: {
outDir: './gen/native',
sourcemap: false,
Expand Down
7 changes: 7 additions & 0 deletions toolkit/bundler/src/vite.native.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {defineConfig, mergeConfig} from 'vite';
import topLevelAwait from 'vite-plugin-top-level-await';
import baseConfig from './vite.base.js';

export default defineConfig(env => mergeConfig(
Expand Down Expand Up @@ -36,5 +37,11 @@ export default defineConfig(env => mergeConfig(
'.json',
],
},
plugins: [
topLevelAwait.default({
promiseExportName: '__tla',
promiseImportName: (i: number) => `__tla_${i}`
})
]
}),
));

0 comments on commit a78a51d

Please sign in to comment.