Skip to content

Commit 6c09b95

Browse files
committed
maybe
1 parent e06a4e4 commit 6c09b95

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

reflex/components/component.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2256,15 +2256,15 @@ def _get_dynamic_imports(self) -> str:
22562256
raise ValueError(msg)
22572257
import_name = format.format_library_name(base_import_name)
22582258

2259-
library_import = f"import('{import_name}')"
2259+
library_import = f"await import('{import_name}')"
22602260
mod_import = (
22612261
# https://nextjs.org/docs/pages/building-your-application/optimizing/lazy-loading#with-named-exports
22622262
f".then((mod) => ({{default: mod.{self.tag}}}))"
22632263
if not self.is_default
22642264
else ""
22652265
)
22662266
return (
2267-
f"const {self.alias or self.tag} = ClientSide(lazy(() => "
2267+
f"const {self.alias or self.tag} = ClientSide(lazy(async () => "
22682268
+ library_import
22692269
+ mod_import
22702270
+ "))"

0 commit comments

Comments
 (0)