Skip to content
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

HMR for _app can fail if a custom _app is removed #27888

Closed
ijjk opened this issue Aug 9, 2021 · 1 comment · Fixed by #28227
Closed

HMR for _app can fail if a custom _app is removed #27888

ijjk opened this issue Aug 9, 2021 · 1 comment · Fixed by #28227
Milestone

Comments

@ijjk
Copy link
Member

ijjk commented Aug 9, 2021

When using a custom pages/_app file and it is removed during development it can cause unexpected errors as seen in the below screen shot. We should handle this gracefully and prevent confusing errors.

screenshot CleanShot 2021-08-08 at 11 36 29@2x

A custom _app also requires restart if added after the dev server was started which could be improved.

@ijjk ijjk added the kind: bug label Aug 9, 2021
@ijjk ijjk added this to the 11.x.x milestone Aug 9, 2021
@kodiakhq kodiakhq bot closed this as completed in #28227 Aug 18, 2021
kodiakhq bot pushed a commit that referenced this issue Aug 18, 2021
This adds the fallback webpack alias handling to handle a custom `_app` or `_document` being removed in development gracefully. 
 
## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [x] Errors have helpful link attached, see `contributing.md`

Fixes: #27888
kodiakhq bot pushed a commit that referenced this issue Aug 19, 2021
This is a follow-up to #28227 to ensure `_app` and `_document` HMR correctly when you start the dev server and then add `_app` and `_document`. 

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [x] Errors have helpful link attached, see `contributing.md`

x-ref: #27888
@balazsorban44
Copy link
Member

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants