Skip to content

ignoredRouteFiles configuration in flatRoutes not working - ignored route files are still accessible #14157

@wangpf1129

Description

@wangpf1129

Reproduction

demo link

System Info

React Router Version: 7.x (latest)
@react-router/fs-routes": "^7.8.0
vite": "^6.3.3

Used Package Manager

npm

Expected Behavior

According to the official documentation:

Any modules in the app/routes directory will become routes in your application by default. The ignoredRouteFiles option allows you to specify files that should not be included as routes.

Actual Behavior

Files listed in ignoredRouteFiles are still:

  • Rendering normally when accessed via their URL path
  • Appearing to be processed by the routing system despite being "ignored"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions