diff --git a/reflex/config.py b/reflex/config.py index c9babf45e0a..b3dc1b5474f 100644 --- a/reflex/config.py +++ b/reflex/config.py @@ -254,6 +254,9 @@ class BaseConfig: # List of fully qualified import paths of plugins to disable in the app (e.g. reflex.plugins.sitemap.SitemapPlugin). disable_plugins: list[str] = dataclasses.field(default_factory=list) + # Whether to skip plugin checks. + _skip_plugins_checks: bool = dataclasses.field(default=False, repr=False) + _prefixes: ClassVar[list[str]] = ["REFLEX_"] @@ -318,7 +321,8 @@ def _post_init(self, **kwargs): setattr(self, key, env_value) # Add builtin plugins if not disabled. - self._add_builtin_plugins() + if not self._skip_plugins_checks: + self._add_builtin_plugins() # Update default URLs if ports were set kwargs.update(env_kwargs) @@ -534,7 +538,7 @@ def _get_config() -> Config: if not spec: # we need this condition to ensure that a ModuleNotFound error is not thrown when # running unit/integration tests or during `reflex init`. - return Config(app_name="") + return Config(app_name="", _skip_plugins_checks=True) rxconfig = importlib.import_module(constants.Config.MODULE) return rxconfig.config