Skip to content

Commit a454b70

Browse files
authored
fix imports with alias from $ (#4332)
1 parent 4c4c59b commit a454b70

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

reflex/components/dynamic.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ def make_component(component: Component) -> str:
111111
if line.startswith("import "):
112112
if 'from "$/' in line or 'from "/' in line:
113113
module_code_lines[ix] = (
114-
line.replace("import ", "const ", 1).replace(
115-
" from ", " = window['__reflex'][", 1
116-
)
114+
line.replace("import ", "const ", 1)
115+
.replace(" as ", ": ")
116+
.replace(" from ", " = window['__reflex'][", 1)
117117
+ "]"
118118
)
119119
else:

0 commit comments

Comments
 (0)