jsx: 'preserve' in optimizeDeps breaks dependency scan when .tsx files use `import.meta.glob`
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript, vite
- Domain
- build-system, frontend
Research direction
Start with the vite:dep-scan:transform:js-glob plugin in packages/vite/src/node/optimizer/scan.ts around the referenced line, then reproduce the failure with the linked vite-plugin-solid-bug project. Trace how jsx: 'preserve' affects .tsx files using import.meta.glob. Done means dependency scanning succeeds for this case without requiring either listed workaround.
Written by the indexing model from the issue text.
Description
Describe
The vite:dep-scan:transform:js-glob plugin asserts that the return result is js. But the vite-plugin-solid plugin sets jsx: 'preserve'.
Reproduction
https://github.com/zhylmzr/vite-plugin-solid-bug
Workarounds
- move
import.meta.globto a singlejs/tsfile. - or change
transform.jsxto:
// vite.config.ts
plugins: [
{
name: 'fix-solid-deps-scan',
enforce: 'post',
config() {
return {
optimizeDeps: {
rolldownOptions: {
transform: {
jsx: {
importSource: 'solid-js/h',
},
},
},
},
}
},
},
]
- 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 65/100
solidjs/solid-vite-plugin#259 · 2 comments · 1 reaction ·
All issues in solidjs/solid-vite-plugin
Similar issues
-
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 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
danielmiessler/LifeOS#2218 ·