Skip to content

[Bug]: route.exclude should take effect in no-config route #3161

@smileluck

Description

@smileluck

Version

System:
    OS: Windows 11 10.0.22631
    CPU: (16) x64 13th Gen Intel(R) Core(TM) i5-1340P
    Memory: 2.89 GB / 15.66 GB
  Browsers:
    Edge: Chromium (144.0.3719.115)
    Internet Explorer: 11.0.22621.3527
  npmPackages:
    @rspress/core: ^2.0.2 => 2.0.3

Details

Project Structure

Image 没问题,根据你提供的内容,我帮你整理了一份标准的英文 Issue 报告。为了更符合开源社区的习惯,我将标题改成了更明确的描述性语句:

📋 Configuration

export default defineConfig({
  root: path.join(__dirname, 'docs'),
  title: 'My Site',
  icon: '/rspress-icon.png',
  logo: {
    light: '/rspress-light-logo.png',
    dark: '/rspress-dark-logo.png',
  },
  route: {
    cleanUrls: true,
    exclude: ['*/_*/**/*',"**/_*","*/_assets/**/*"],
  },
})

✅ Expected Result

The sidebar should not generate routes for paths matching _assets.

❌ Actual Result

Routes for _assets are still appearing in the sidebar navigation.

Reproduce link

https://github.com/smileluck/SmileX-Note-Repress

Reproduce Steps

  1. git checkout -d pure
  2. pnpm install
  3. pnpm run dev

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions