rsnext/packages/next
Jiachi Liu e9d23d709c
fix: react dev bundle is picked in prod mode (#39221)
When we detect if `reactRoot` rendering should be enabled we `require` the require to check the version. But at that time the `NODE_ENV` isn't set yet. Then the react dev build stays in the `require.cache` that any future require of react will get the wrong build. In that case, React dev bundle is picked in production mode.

Fun fact: if you're using hooks, that seem not to effect you, but context consumer works different then you couldn't get the proper context from provider.

Fixes #38176
Fixes #38765
Fixes #38332

## Bug

- [x] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`
2022-08-01 14:21:42 +00:00
..
bin fix: react dev bundle is picked in prod mode (#39221) 2022-08-01 14:21:42 +00:00
build Refactor Flight plugins to use types. (#39136) 2022-07-28 22:35:52 +00:00
bundles update webpack (#35867) 2022-04-07 16:00:26 +00:00
cli feat(cli): report eslint-config-next version in next info (#38062) 2022-06-27 14:04:47 -05:00
client Fix: only contain middleware in dev middleware manifest (#39217) 2022-08-01 13:23:24 +00:00
compiled Update pre-compiled to fix check (#39089) 2022-07-27 20:44:39 -05:00
export Add exportPathMap config type/schema field (#39171) 2022-07-29 12:59:00 -05:00
future Add experimental next/future/image component (#37927) 2022-06-24 14:56:05 +00:00
image-types Don't import internally from types in next-env.d.ts (#34394) 2022-02-19 04:25:49 +01:00
lib chore: Clean up imports and unused code (#39044) 2022-07-26 21:41:59 +00:00
pages Fix default error style overrides (#39169) 2022-07-29 13:09:41 -05:00
server Fix: only contain middleware in dev middleware manifest (#39217) 2022-08-01 13:23:24 +00:00
shared/lib Fix: only contain middleware in dev middleware manifest (#39217) 2022-08-01 13:23:24 +00:00
telemetry Collect telemetry for next/future/image (#39046) 2022-07-28 15:03:24 -05:00
trace Small code improvements (#37227) 2022-05-26 23:19:47 +00:00
types refactor: rewrite etag (#38568) 2022-07-18 09:20:44 +00:00
amp.d.ts
amp.js
app.d.ts
app.js
babel.d.ts
babel.js
client.d.ts
client.js
config.d.ts
config.js
constants.d.ts
constants.js
data.d.ts
data.js
data.sqlite
document.d.ts
document.js
dynamic.d.ts
dynamic.js
error.d.ts
error.js
head.d.ts
head.js fix(#36435): apply correct fix (#36464) 2022-04-26 11:15:49 -05:00
image.d.ts
image.js
index.d.ts Add next.config.js validation with ajv (#38498) 2022-07-13 13:31:55 -05:00
jest.d.ts
jest.js fix(#36534): enable interopClientDefaultExport for next/jest (#36824) 2022-05-11 13:13:13 -05:00
license.md Update license year 2022-01-13 16:02:34 +01:00
link.d.ts
link.js
package.json Add missing @napi-rs/cli devDependency to next-swc (#39164) 2022-07-30 22:08:50 +00:00
README.md Update README.md (#38371) 2022-07-07 23:00:34 -05:00
router.d.ts
router.js
script.d.ts
script.js
server.d.ts Middleware: remove req.ua (#37512) 2022-06-09 11:10:21 +00:00
server.js Middleware: remove req.ua (#37512) 2022-06-09 11:10:21 +00:00
taskfile-ncc.js
taskfile-swc.js chore: enable swc externalHelpers when pre-compile (#38182) 2022-07-26 14:23:19 -05:00
taskfile.js Replace node-sass test dependency with sass (#39053) 2022-07-26 23:12:54 -05:00
tsconfig.json chore: TS improvments (#38834) 2022-07-20 16:48:45 +00: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

Security

If you believe you have found a security vulnerability in Next.js, we encourage you to responsibly disclose this and not open a public issue. We will investigate all legitimate reports. Email security@vercel.com to disclose any security vulnerabilities.

https://vercel.com/security