rsnext/packages/next
Javi Velasco 5a3d558c9f
Fix HMR for middleware #30791 (#31548)
Fixes #30791

The issue is that with Middleware we are introducing client compilation on a new layer. When a middleware changes (or is dropped after some time), Webpack reorganizes non-user modules as they are duplicated across different layer. This is currently triggering a full reload.

This also brings tests for HMR:
- Refresh on a Middleware change
- HMR works after a middleware compilation change.

Co-authored-by: Tobias Koppers <1365881+sokra@users.noreply.github.com>
2021-11-18 18:23:52 +00:00
..
bin Use import() to load next.config.js (#29935) 2021-10-16 14:22:42 +02:00
build Fix HMR for middleware #30791 (#31548) 2021-11-18 18:23:52 +00:00
bundles Add webpack5 types to right files 2021-11-09 15:40:13 +01:00
cli Automatically use different port to start dev server for non-explicit port (#30736) 2021-11-11 17:19:20 -05:00
client Fix unhandled rejection on route change in dev (#31554) 2021-11-17 21:33:56 +00:00
compiled update webpack (#31455) 2021-11-16 17:28:42 +00:00
export Fix middleware i18n rewrites (#31174) 2021-11-09 01:28:39 +00:00
image-types Add support for AVIF to next/image (#29683) 2021-10-11 23:17:47 +00:00
lib fix: allow next lint without eslint-config-next installed (#29823) 2021-11-16 14:07:31 +01:00
native Chore/rust workflow (#30577) 2021-10-29 13:56:56 -05:00
pages Do not hide body when concurrentFeatures is enabled (#31187) 2021-11-09 00:45:44 +00:00
server Adjust AVIF size so that its smaller than WebP size (#31494) 2021-11-17 20:31:16 +00:00
shared/lib Fix basePath replacing server-side and normalizeLocalePath() when path is empty string (#30978) 2021-11-15 17:33:21 +00:00
telemetry telemetry: track usage of 'optimizeFonts' (#31522) 2021-11-17 13:33:37 -06:00
trace Fix version in trace (#30982) 2021-11-04 20:56:30 +00:00
types Refactor server/render for SSR streaming (#31231) 2021-11-15 15:29:34 +00:00
amp.d.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
amp.js Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
app.d.ts
app.js
babel.d.ts
babel.js
client.d.ts
client.js
config.d.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
config.js Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
constants.d.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
constants.js Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
data.d.ts
data.js
data.sqlite Fix export worker threads options (#25063) 2021-05-14 12:50:29 +02:00
document.d.ts
document.js
dynamic.d.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
dynamic.js Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
error.d.ts
error.js
head.d.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
head.js Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
image.d.ts Image component foundation (#17343) 2020-10-14 11:57:10 +02:00
image.js Image component foundation (#17343) 2020-10-14 11:57:10 +02:00
jest.d.ts Ensure next/jest is published (#31296) 2021-11-11 11:48:12 +01:00
jest.js Ensure next/jest is published (#31296) 2021-11-11 11:48:12 +01:00
license.md Update license year for all packages 2021-01-11 11:12:19 +01:00
link.d.ts
link.js
package.json v12.0.5-canary.3 2021-11-18 09:25:26 -06:00
README.md docs(readme.md): add good first issue section to readme (#25085) 2021-05-18 16:10:01 -05:00
router.d.ts
router.js
script.d.ts Remove experimental tag from Script component (#25435) 2021-06-03 13:56:50 +02:00
script.js Remove experimental tag from Script component (#25435) 2021-06-03 13:56:50 +02:00
server.d.ts Implement Middleware RFC (#30081) 2021-10-20 17:52:11 +00:00
server.js Implement Middleware RFC (#30081) 2021-10-20 17:52:11 +00:00
taskfile-ncc.js Migrate server-sent events HMR connection to WebSocket (#29903) 2021-10-15 07:09:54 +00:00
taskfile-swc.js Use import() to load next.config.js (#29935) 2021-10-16 14:22:42 +02:00
taskfile.js use loader-utils 2 for resolve-url-loader to fix ./data: urls in sass (#31134) 2021-11-08 18:37:25 +00:00
tsconfig.json Revert incremental config to fix missing types (#30644) 2021-10-29 23:16:11 -05:00
vitals.d.ts Fix ie11 from untranspiled vitals (#29532) 2021-10-01 10:19:36 -05:00
vitals.js Fix ie11 from untranspiled vitals (#29532) 2021-10-01 10:19:36 -05:00

Next.js

Getting Started

Visit https://nextjs.org/learn to get started with Next.js.

Documentation

Visit https://nextjs.org/docs to view the full documentation.

Who is using Next.js?

Next.js is used by the world's leading companies. Check out the Next.js Showcase to learn more.

Community

The Next.js community can be found on GitHub Discussions, where you can ask questions, voice ideas, and share your projects.

To chat with other community members you can join the Next.js Discord.

Our Code of Conduct applies to all Next.js community channels.

Contributing

Please see our contributing.md.

Good First Issues

We have a list of good first issues that contain bugs which have a relatively limited scope. This is a great place to get started, gain experience, and get familiar with our contribution process.

Authors