-
-
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
fix: use path for renderer entrypoint #12563
Conversation
🦋 Changeset detectedLatest commit: 122bd67 The changes in this PR will be included in the next version bump. 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 |
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.
I remember we had a similar issue when loading a middleware file inside a project that had a space in its name.
Since both files use the vite module loader in dev, I believe it's a vite issue.
Happy with the fix
CodSpeed Performance ReportMerging #12563 will degrade performances by 16%Comparing Summary
Benchmarks breakdown
|
I'll see if I can do a pure-Vite repro |
Ah damn this is failing on Windows now. Weird because fileURLToPath should be robust there. I think we may need another approach. |
Yup, it's upstream. I think we should close this rather than trying to work around it. I'll try another approach for the MDX case specifically. vitejs/vite#9917 @bluwy |
Changes
#12533 changed the MDX entrypoint to a URL, so that it could be resolved correctly. However this introduced a different bug that meant the entrypoint could not be resolved in dev if there was a space in the path. It's unclear whether this is a Vite bug or ours, but we can fix it by using
fileURLToPath
instead of passing the URL directly. This PR converts any entrypoint URLs to paths.Fixes #12556
Testing
This is hard to test in the monorepo, because it needs a space in the path to the integration not the site. I tested it by renaming my monorepo folder, but I couldn't work out an easy way to do a test fixture for it.
Docs