Skip to content

Generated Pathname type resolves to non-route paths #15115

@teemingc

Description

@teemingc

Describe the bug

If I create a /_includes/ directory to put assets in the routes directory, it appears as a valid route for the Pathname type. Ideally, only actual pages and endpoints are included.

Reproduction

Create a folder without a +page or +server and run the dev server. Then, observe the generated Pathname type includes the empty folder pathname

Logs

System Info

System:
    OS: macOS 26.2
    CPU: (8) arm64 Apple M1 Pro
    Memory: 90.53 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 24.12.0 - /Users/teeming/Library/pnpm/node
    Yarn: 3.2.3 - /Users/teeming/Library/pnpm/yarn
    npm: 11.6.2 - /Users/teeming/Library/pnpm/npm
    pnpm: 10.27.0 - /Users/teeming/Library/pnpm/pnpm
    bun: 1.3.3 - /opt/homebrew/bin/bun
    Deno: 2.5.6 - /opt/homebrew/bin/deno
  Browsers:
    Chrome: 143.0.7499.170
    Chrome Canary: 135.0.7048.0
    Firefox: 144.0
    Firefox Developer Edition: 130.0
    Safari: 26.2
    Safari Technology Preview: 26.0
  npmPackages:
    @sveltejs/adapter-cloudflare: ^7.2.4 => 7.2.4 
    @sveltejs/kit: ^2.49.2 => 2.49.2 
    @sveltejs/vite-plugin-svelte: ^6.2.1 => 6.2.1 
    svelte: ^5.46.1 => 5.46.1 
    vite: ^7.3.0 => 7.3.0

Severity

annoyance

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions