Skip to content

fix: end route module ids in the source extension so unplugin filters match#2242

Open
birkskyum wants to merge 2 commits into
solidjs:mainfrom
birkskyum:fix-issue-1374
Open

fix: end route module ids in the source extension so unplugin filters match#2242
birkskyum wants to merge 2 commits into
solidjs:mainfrom
birkskyum:fix-issue-1374

Conversation

@birkskyum

Copy link
Copy Markdown
Member

Route files are requested with a ?pick=... query, leaving ids like src/routes/index.tsx?pick=default&pick=$css. That does not end in .tsx, so plugins filtering with an end-anchored extension regex (/\.[jt]sx?$/, the default in unplugin-auto-import and friends) silently skip every route file.

The query now ends with &lang.<ext>, the same convention @vitejs/plugin-vue uses for ?vue&type=script&lang.ts. The three places that built this string share a toRouteModuleId() helper.

That change moves the query into Rollup's chunk base name, so sanitizeRouteChunkName strips it back off via output.sanitizeFileName. Output filenames are unchanged from before this PR.

Verified with stock AutoImport({ dirs: [...] }) and no include override: the import is now injected into route chunks, in both build and dev. Existing suites pass (64 unit, 30 e2e, 30 bundled-dev), all fixtures build.

@changeset-bot

changeset-bot Bot commented Jul 26, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ccfd266

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@solidjs/start Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify

netlify Bot commented Jul 26, 2026

Copy link
Copy Markdown

Deploy Preview for solid-start-landing-page ready!

Name Link
🔨 Latest commit ccfd266
🔍 Latest deploy log https://app.netlify.com/projects/solid-start-landing-page/deploys/6a65fefc09423100082e6803
😎 Deploy Preview https://deploy-preview-2242--solid-start-landing-page.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@pkg-pr-new

pkg-pr-new Bot commented Jul 26, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@solidjs/start@2242

commit: ccfd266

@birkskyum birkskyum added 2.x targeting SolidStart 2.x versions file routes labels Jul 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.x targeting SolidStart 2.x versions file routes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug?]: unplugin-icons + unplugin-auto-import don't work within filesystem routes

1 participant