rsnext/packages/next/next-server/lib
Jamie fa5d41b346
fix: replace usage of fromEntries in browser bundled resolve-rewrites.ts (#25208)
## Bug

- [x] Related issues linked using `fixes #number`
- [ ] Integration tests added

Fixes #25207

Currently rewritten routes that use a `has` condition throw an `Object.fromEntries is not a function` error in older browsers.

## Documentation / Examples

- [x] Make sure the linting passes

## Solution

As mentioned in issue #25207, looks like last year the team decided not to include the `fromEntries` polyfill https://github.com/vercel/next.js/pull/15772#discussion_r463957221.

As such, we should avoid using non-polyfilled methods in core next.js code bundled in the browser.

This PR's changes should result in the same object being returned, without using `fromEntries`.
2021-05-18 20:18:57 +00:00
..
i18n Ensure locale cookie does not error with similarly named cookie (#24182) 2021-04-20 13:41:14 +00:00
router fix: replace usage of fromEntries in browser bundled resolve-rewrites.ts (#25208) 2021-05-18 20:18:57 +00:00
amp-context.ts Add sourcemaps to Next.js core compilation (#13049) 2020-05-19 09:09:59 +02:00
amp.ts chore(next): export/lib/next-server missing types (#13320) 2020-05-24 22:44:05 +00:00
constants.ts Land - Font optimizations - Adobe Fonts / Typekit support (#24834) 2021-05-06 04:02:07 +00:00
document-context.ts Support persisting the dev cache buster (#15827) 2020-08-03 14:22:55 +00:00
dynamic.tsx Update err.sh links to use nextjs.org/docs/messages instead (#23353) 2021-03-29 10:25:00 +02:00
head-manager-context.ts Script loader component (#18281) 2020-12-01 19:10:16 +01:00
head.tsx Font optimization bug fix (#24968) 2021-05-12 13:39:26 +02:00
loadable-context.ts Add sourcemaps to Next.js core compilation (#13049) 2020-05-19 09:09:59 +02:00
loadable.d.ts Improve linting rules to catch more errors (#9374) 2019-11-10 19:24:53 -08:00
loadable.js Remove unused variable (#13716) 2020-06-03 11:58:58 -04:00
mitt.ts Remove tslint disables (#16116) 2020-08-12 14:39:07 +00:00
post-process.ts Escape href when detecting already existing preload tags (#20782) 2021-05-14 02:40:20 +00:00
router-context.ts Add sourcemaps to Next.js core compilation (#13049) 2020-05-19 09:09:59 +02:00
runtime-config.ts chore(next): export/lib/next-server missing types (#13320) 2020-05-24 22:44:05 +00:00
side-effect.tsx Handle rendering next/head outside of Next.js (#14511) 2020-06-23 20:46:40 +00:00
to-base-64.ts Fix html validation for Image component (#18903) 2020-11-07 17:39:14 +00:00
utils.ts Improving script loading strategy (#24939) 2021-05-13 12:39:36 +02:00