Skip to content

Inconsistent types between plugins and disable_plugins in rx.Config (str vs Plugin) #6150

@albertmartin-design

Description

@albertmartin-design

Summary

In rx.Config, the disable_plugins parameter only accepts a list of strings, while the plugins parameter correctly expects a list of Plugin instances. This creates an inconsistency and produces warnings when trying to disable built‑in plugins such as SitemapPlugin, which is defined as a Plugin object rather than a string.

Expected Behavior

Both plugins and disable_plugins should follow the same type pattern. Since plugins accepts a list of Plugin instances, it would be more consistent for disable_plugins to also accept a list of Plugin objects (or at least support both types).

Actual Behavior

  • disable_plugins only accepts list[str].
  • Adding "SitemapPlugin" to disable_plugins triggers warnings because the sitemap is defined as a Plugin instance.
  • This makes disabling built‑in plugins unintuitive and error‑prone.

Example

import reflex as rx

config = rx.Config(
    plugins=[rx.plugins.SitemapPlugin()],
    disable_plugins=[rx.plugins.SitemapPlugin()],  # Causes warnings
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions