-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf(remix-dev/vite): disable server.preTransformRequests
for child compiler
#8121
perf(remix-dev/vite): disable server.preTransformRequests
for child compiler
#8121
Conversation
🦋 Changeset detectedLatest commit: 32d5347 The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
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 |
Not sure if this API is available in Vite 5. Looking at this repo, seems like |
I think what The above code snippet I copied from It seems this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense to me. Thanks for the PR!
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
While investigating
@remix-run/dev/server-build
support for #8122, I found that static import in route file is triggering vite'swarmupRequest
internally, which I think is unnecessary for child compiler since remix only needs to transpile route file itself to extract exports.https://github.com/vitejs/vite/blob/0654d1b52448db4d7a9b69aee6aad9e015481452/packages/vite/src/node/plugins/importAnalysis.ts#L621-L631
testing strategy
It's a little crude, but I can see the change from the logs of
DEBUG="vite:transform" vite dev
.Reproduction is here https://github.com/hi-ogawa/remix-vite-experiment-preTransformRequests which has this structure:
before
after