Skip to content

Commit

Permalink
Use await for import
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasDov committed Dec 16, 2024
1 parent d297fa5 commit e542a0d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 1 addition & 2 deletions app/frontend/src/app/ITwinJsApp/ITwinJsApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ import { demoIModels, IModelIdentifier } from "./IModelIdentifier.js";
import { InitializedApp } from "./InitializedApp.js";

if (EXPERIMENTAL_STATION_VALUE_RENDERER) {
// eslint-disable-next-line @typescript-eslint/no-floating-promises
import("../experimental/StationPropertyValueRenderer.js");
await import("../experimental/StationPropertyValueRenderer.js");
}

export interface ITwinJsAppProps {
Expand Down
5 changes: 5 additions & 0 deletions app/frontend/vite.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ export default defineConfig(({ mode }) => {
port: 3000,
strictPort: true,
},
esbuild: {
supported: {
"top-level-await": true, // browsers can handle top-level-await features
},
},
css: {
preprocessorOptions: {
scss: {
Expand Down

0 comments on commit e542a0d

Please sign in to comment.