@@ -254,6 +254,9 @@ class BaseConfig:
254254 # List of fully qualified import paths of plugins to disable in the app (e.g. reflex.plugins.sitemap.SitemapPlugin).
255255 disable_plugins : list [str ] = dataclasses .field (default_factory = list )
256256
257+ # Whether to skip plugin checks.
258+ _skip_plugins_checks : bool = dataclasses .field (default = False , repr = False )
259+
257260 _prefixes : ClassVar [list [str ]] = ["REFLEX_" ]
258261
259262
@@ -284,6 +287,9 @@ class Config(BaseConfig):
284287 See the [configuration](https://reflex.dev/docs/getting-started/configuration/) docs for more info.
285288 """
286289
290+ # Track whether the app name has already been validated for this Config instance.
291+ _app_name_is_valid : bool = dataclasses .field (default = False , repr = False )
292+
287293 def _post_init (self , ** kwargs ):
288294 """Post-initialization method to set up the config.
289295
@@ -315,7 +321,8 @@ def _post_init(self, **kwargs):
315321 setattr (self , key , env_value )
316322
317323 # Add builtin plugins if not disabled.
318- self ._add_builtin_plugins ()
324+ if not self ._skip_plugins_checks :
325+ self ._add_builtin_plugins ()
319326
320327 # Update default URLs if ports were set
321328 kwargs .update (env_kwargs )
@@ -531,7 +538,7 @@ def _get_config() -> Config:
531538 if not spec :
532539 # we need this condition to ensure that a ModuleNotFound error is not thrown when
533540 # running unit/integration tests or during `reflex init`.
534- return Config (app_name = "" )
541+ return Config (app_name = "" , _skip_plugins_checks = True )
535542 rxconfig = importlib .import_module (constants .Config .MODULE )
536543 return rxconfig .config
537544
0 commit comments