This commit is contained in:
Khaleel Al-Adhami 2024-10-23 18:29:52 -07:00
parent 39bbbd94c9
commit 2fb0b449fd

View File

@ -93,7 +93,7 @@ def load_dynamic_serializer():
for lib, names in component._get_all_imports().items():
formatted_lib_name = format_library_name(lib)
if (
not lib.startswith((".", "/"))
not lib.startswith((".", "$/"))
and not lib.startswith("http")
and formatted_lib_name not in libs_in_window
):
@ -109,7 +109,7 @@ def load_dynamic_serializer():
# Rewrite imports from `/` to destructure from window
for ix, line in enumerate(module_code_lines[:]):
if line.startswith("import "):
if 'from "/' in line:
if 'from "$/' in line:
module_code_lines[ix] = (
line.replace("import ", "const ", 1).replace(
" from ", " = window['__reflex'][", 1