-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix(middleware): don't import via entrypoint #12707
Conversation
🦋 Changeset detectedLatest commit: fc358f3 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.
Code looks good, I think it's worth creating a preview release for the user to test
Is it, though? I added a test that is the same as the one provided in the issue. |
!preview middleware-fix |
Snapshots have been released for the following packages:
Publish Log
Build Log
|
CodSpeed Performance ReportMerging #12707 will not alter performanceComparing Summary
|
Changes
Closes #12690
The middleware was always imported during the build, even before its execution.
This PR changes that by assigning a function that does the loading.
Testing
CI should pass. I created a new test case. In the test case the middleware imports a file that throws an error at runtime. In the test case the middleware isn't used because all pages SSR, so no errors should be thrown.
Docs
N/A