Speed up vite-plugin-solid with vite hook filters
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 65/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- build-system, tooling
Research direction
The issue does not name a file or test; locate the Vite plugin transform hooks in the solid-vite-plugin source and compare their current id checks with the hook-filter API linked in the report. Preserve backward compatibility as described, then verify the plugin's Vite build behavior and the reported transform performance improvement.
Written by the indexing model from the issue text.
Description
During our vite build a significant amount of time (60+%) is spent in vite plugin solid.
Since rolldown vite plugins can be sped up significantly with hook filters to allow for fewer Rust to JS calls.
https://rolldown.rs/apis/plugin-api/hook-filters
By turning this:
export default function myPlugin() {
return {
name: 'example',
transform(code, id) {
if (!id.endsWith('.data')) {
// early return
return
}
// perform actual transform
return transformedCode
},
}
}
into this
export default function myPlugin() {
return {
name: 'example',
transform: {
filter: {
id: /\.data$/
},
handler(code) {
// perform actual transform
return transformedCode
},
}
}
}
Backward compatibility
The syntax has supported since vite 6.3+ and could be made backward compatible by leaving the checks in the handlers.
Implementation
Would you be interested in a PR for this change?
- Dominant language
- TypeScript
- Stars
- 520
- Forks
- 70
- Avg merge
- 23h 35m
- Merged PRs (30d)
- 39
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from solidjs/solid-vite-plugin
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
solidjs/solid-vite-plugin#205 · 1 comment · 2 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
solidjs/solid-vite-plugin#369 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
solidjs/solid-vite-plugin#328 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
solidjs/solid-vite-plugin#308 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
solidjs/solid-vite-plugin#262 · 2 comments ·
All issues in solidjs/solid-vite-plugin
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
copse-dev/agent-pane#2953 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·