Skip to content

Commit 1ed1b94

Browse files
committed
define spa fallback
1 parent c0479d3 commit 1ed1b94

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

reflex/constants/base.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ class ReactRouter(Javascript):
174174
rf"(?:{DEV_FRONTEND_LISTENING_REGEX}|{PROD_FRONTEND_LISTENING_REGEX})(.*)"
175175
)
176176

177+
SPA_FALLBACK = "__spa-fallback.html"
178+
177179

178180
# Color mode variables
179181
class ColorMode(SimpleNamespace):

reflex/utils/build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def build():
201201
processes.show_progress("Creating Production Build", process, checkpoints)
202202
_duplicate_index_html_to_parent_dir(wdir / constants.Dirs.STATIC)
203203
path_ops.cp(
204-
wdir / constants.Dirs.STATIC / "__spa-fallback.html",
204+
wdir / constants.Dirs.STATIC / constants.ReactRouter.SPA_FALLBACK,
205205
wdir / constants.Dirs.STATIC / "404.html",
206206
)
207207

0 commit comments

Comments
 (0)