fix!: don't force optimization of jsx-runtime #132
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On my testing I found that this is correctly found by the optimiser.
No body also complain about the missing entry when not using the default one.
There is one edge case in the ssr test that fails on windows and ubuntu (node 14&16, not 18 🤦♂️). This is due to Vite returning an error for non variable/on going reprocessed of the pre-bundled deps. As this happens on a very particular setup, only in dev, and can be fixed by manually passing it in the config, I think the change should be part of the major.
With that we can make it clear that this is not expected to be set for TS projects, which was asked by some, and allow the niche case asked once of different runtime inside the same app (works great if not set thanks to tsconfck)
This other option is to invite people to pass is and have something like this: https://github.com/vitejs/vite-plugin-react-swc/blob/7fde2e9d748fc502f4463e81484cf8d6e34f69b5/src/index.ts#L65