fix: transform TSX before es-module-lexer when bundledDev is active#15013
Open
aayushbaluni wants to merge 2 commits intoremix-run:mainfrom
Open
fix: transform TSX before es-module-lexer when bundledDev is active#15013aayushbaluni wants to merge 2 commits intoremix-run:mainfrom
aayushbaluni wants to merge 2 commits intoremix-run:mainfrom
Conversation
Route transforms now compile hook-provided sources via the child compiler before chunk detection, and export scanning falls back through esbuild when lexing fails. Babel parsing uses TS/JSX plugins for raw route modules. Fixes remix-run#14947.
Contributor
|
Hi @aayushbaluni, Welcome, and thank you for contributing to React Router! Before we consider your pull request, we ask that you sign our Contributor License Agreement (CLA). We require this only once. You may review the CLA and sign it by adding your name to contributors.yml. Once the CLA is signed, the If you have already signed the CLA and received this response in error, or if you have any questions, please contact us at hello@remix.run. Thanks! - The Remix team |
Contributor
|
Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
When using Vite 8's
experimental.bundledDev,es-module-lexerreceives raw TSX code that hasn't been transformed, causing build failures since the lexer can't parse JSX syntax.Change
getExportNamesfalls back toesbuildtransform whenes-module-lexerfails on untransformed codeFixes #14947.
Made with Cursor