diff --git a/packages/reflex-base/src/reflex_base/constants/installer.py b/packages/reflex-base/src/reflex_base/constants/installer.py index 39c90dec1a6..1578ace7f2c 100644 --- a/packages/reflex-base/src/reflex_base/constants/installer.py +++ b/packages/reflex-base/src/reflex_base/constants/installer.py @@ -107,20 +107,6 @@ class Commands(SimpleNamespace): DEV = "react-router dev --host" EXPORT = "react-router build" - @staticmethod - def get_prod_command(frontend_path: str = "") -> str: - """Get the prod command with the correct 404.html path for the given frontend_path. - - Args: - frontend_path: The frontend path prefix (e.g. "/app"). - - Returns: - The sirv command with the correct --single fallback path. - """ - stripped = frontend_path.strip("/") - fallback = f"{stripped}/404.html" if stripped else "404.html" - return f"sirv ./build/client --single {fallback} --host" - PATH = "package.json" _react_version = _determine_react_version() diff --git a/tests/units/test_prerequisites.py b/tests/units/test_prerequisites.py index af6d3df7dd2..9b908002850 100644 --- a/tests/units/test_prerequisites.py +++ b/tests/units/test_prerequisites.py @@ -5,7 +5,6 @@ import pytest from click.testing import CliRunner from reflex_base.config import Config -from reflex_base.constants.installer import PackageJson from reflex_base.utils.decorator import cached_procedure from reflex.reflex import cli @@ -91,24 +90,6 @@ def test_initialise_vite_config(config, expected_output): assert expected_output in output -@pytest.mark.parametrize( - ("frontend_path", "expected_command"), - [ - ("", "sirv ./build/client --single 404.html --host"), - ("/", "sirv ./build/client --single 404.html --host"), - ("/app", "sirv ./build/client --single app/404.html --host"), - ("/app/", "sirv ./build/client --single app/404.html --host"), - ("app", "sirv ./build/client --single app/404.html --host"), - ( - "/deep/nested/path", - "sirv ./build/client --single deep/nested/path/404.html --host", - ), - ], -) -def test_get_prod_command(frontend_path, expected_command): - assert PackageJson.Commands.get_prod_command(frontend_path) == expected_command - - def test_cached_procedure(): call_count = 0