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
feat(nextjs): Automatically resolve source of errors in dev mode #7294
Conversation
size-limit report 📦
|
@@ -13,18 +19,18 @@ const config: PlaywrightTestConfig = { | |||
* Maximum time expect() should wait for the condition to be met. | |||
* For example in `await expect(locator).toHaveText();` | |||
*/ | |||
timeout: 5000, | |||
timeout: 10000, | |||
}, | |||
/* Run tests in files in parallel */ | |||
fullyParallel: true, | |||
/* Fail the build on CI if you accidentally left test.only in the source code. */ | |||
forbidOnly: !!process.env.CI, | |||
/* Retry on CI only */ |
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.
l: Should we update this comment as well?
return; | ||
} | ||
|
||
test('should have symbaolicated dev errors', async ({ page }) => { |
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.
test('should have symbaolicated dev errors', async ({ page }) => { | |
test('should have symbolicated dev errors', async ({ page }) => { |
small typo ;)
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.
might have been hungry
* in the dev overlay. | ||
*/ | ||
export async function devErrorSymbolicationEventProcessor(event: Event, hint: EventHint): Promise<Event | null> { | ||
// Do to changes across Next.js versions, there are a million things that can go wrong here so we just try-catch the |
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.
// Do to changes across Next.js versions, there are a million things that can go wrong here so we just try-catch the | |
// Due to changes across Next.js versions, there are a million things that can go wrong here so we just try-catch the |
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.
Nice! The regex is a bit 😬 but since it's only for dev that's fine. Cool improvement!
Fixes #7286
This PR uses the Next.js dev server to resolve source maps in dev mode, eliminating the need to update them.
Before
After