fix imports with alias from $

This commit is contained in:
Khaleel Al-Adhami 2024-11-07 16:53:46 -08:00
parent 4c4c59bf04
commit 082d9d3179

View File

@ -111,9 +111,9 @@ def load_dynamic_serializer():
if line.startswith("import "): if line.startswith("import "):
if 'from "$/' in line or 'from "/' in line: if 'from "$/' in line or 'from "/' in line:
module_code_lines[ix] = ( module_code_lines[ix] = (
line.replace("import ", "const ", 1).replace( line.replace("import ", "const ", 1)
" from ", " = window['__reflex'][", 1 .replace(" as ", ": ")
) .replace(" from ", " = window['__reflex'][", 1)
+ "]" + "]"
) )
else: else: