Skip to content

Commit f2232e3

Browse files
committed
add the fix
1 parent ef89f7c commit f2232e3

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

reflex/compiler/templates.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -581,9 +581,6 @@ def vite_config_template(
581581
enableNativePlugin: false,
582582
hmr: {"true" if experimental_hmr else "false"},
583583
}},
584-
legacy: {{
585-
inconsistentCjsInterop: true,
586-
}},
587584
server: {{
588585
port: process.env.PORT,
589586
hmr: {"true" if hmr else "false"},

reflex/components/component.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2263,9 +2263,9 @@ def _get_dynamic_imports(self) -> str:
22632263
library_import = f"import('{import_name}')"
22642264
mod_import = (
22652265
# https://nextjs.org/docs/pages/building-your-application/optimizing/lazy-loading#with-named-exports
2266-
f".then((mod) => ({{default: mod.{self.tag}}}))"
2266+
f".then((mod) => mod.{self.tag})"
22672267
if not self.is_default
2268-
else ""
2268+
else ".then((mod) => mod.default)"
22692269
)
22702270
return (
22712271
f"const {self.alias or self.tag} = ClientSide(lazy(() => "

reflex/testing.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@
2323
from http.server import SimpleHTTPRequestHandler
2424
from importlib.util import find_spec
2525
from pathlib import Path
26-
from typing import TYPE_CHECKING, Any, Literal, Self, TypeVar
26+
from typing import TYPE_CHECKING, Any, Literal, TypeVar
2727

2828
import uvicorn
29+
from typing_extensions import Self
2930

3031
import reflex
3132
import reflex.reflex

0 commit comments

Comments
 (0)