Skip to content

Conversation

@lobsterkatie
Copy link
Member

@lobsterkatie lobsterkatie commented May 31, 2021

This removes a hack which was getting around an async/await problem, wherein what should have been a value was instead a promise. This mismatch prevented next's internal work cleaning up the webpack entry property and forced us to do it instead. (Specifically, next merges the main.js and main entries, before deleting the main.js entry.)

In addition to being a little ugly, this hack introduced a bug, because we deleted, but didn't merge. This gets around that problem by fixing the return type so that next can correctly access the value and do the merging and deleting itself.

Fixes #3538
Fixes #3591

@lobsterkatie lobsterkatie requested a review from kamilogorek as a code owner May 31, 2021 06:20
@github-actions
Copy link
Contributor

size-limit report

Path Size
@sentry/browser - CDN Bundle (gzipped) 20.76 KB (0%)
@sentry/browser - Webpack 21.98 KB (0%)
@sentry/react - Webpack 22.01 KB (0%)
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped) 28.16 KB (0%)

@HazAT HazAT merged commit ab21117 into kmclb-next-js-performance May 31, 2021
@HazAT HazAT deleted the kmclb-fix-delete-mainjs-hack branch May 31, 2021 07:48
@onurtemizkan
Copy link
Collaborator

This also fixes #3538

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants