rsnext/packages/next
Kristoffer K 1c75bf789b
perf(next): use require.resolve instead of resolve (#19518)
**What's the problem this PR addresses?**

- ~~https://github.com/vercel/next.js/pull/18768 started to ncc babel and thus it's version of resolve which breaks PnP support~~
Babel replaced `resolve` with the builtin `require.resolve` and a polyfill for older node versions in https://github.com/babel/babel/pull/12439 which was upgraded in https://github.com/vercel/next.js/pull/20586
- `next` unnecessarily bundles the `resolve` package when `require.resolve` is builtin and can do the same job

**How did you fix it?**

- ~~Avoid running `resolve` through ncc~~
Added a test for https://github.com/vercel/next.js/issues/19334 (closes https://github.com/vercel/next.js/issues/19334)
- Replace `resolve` with `require.resolve`
2021-01-11 14:43:08 +00:00
..
bin Update experimental profiling (#20357) 2020-12-21 16:02:41 +00:00
build perf(next): use require.resolve instead of resolve (#19518) 2021-01-11 14:43:08 +00:00
bundles/babel ncc 0.25.0 upgrade and fixes (#18873) 2020-11-06 02:33:14 +00:00
cli Update experimental profiling (#20357) 2020-12-21 16:02:41 +00:00
client refactor(next): client/index.tsx (#20806) 2021-01-07 15:02:10 +00:00
compiled perf(next): use require.resolve instead of resolve (#19518) 2021-01-11 14:43:08 +00:00
export Error when exporting to static directory (#20969) 2021-01-11 13:34:58 +00:00
lib perf(next): use require.resolve instead of resolve (#19518) 2021-01-11 14:43:08 +00:00
next-server Add missing isReady declaration to NextRouter type (#20819) 2021-01-06 17:44:35 +00:00
pages Move CSS Preloads to top of head at document render (#18864) 2020-12-30 17:12:46 -05:00
server Remove import type syntax from core files (#20379) 2020-12-28 22:04:51 +00:00
telemetry ncc 0.25.0 upgrade and fixes (#18873) 2020-11-06 02:33:14 +00:00
types perf(next): use require.resolve instead of resolve (#19518) 2021-01-11 14:43:08 +00:00
amp.d.ts Remove re-exports of default when they don't exist (#9450) 2019-11-18 20:11:59 -06:00
amp.js Move next-server back into next package (#8613) 2019-09-04 10:00:54 -04:00
app.d.ts Move syntax formatting to prettier (#7454) 2019-05-29 13:57:26 +02:00
app.js
babel.d.ts Remove re-exports of default when they don't exist (#9450) 2019-11-18 20:11:59 -06:00
babel.js
client.d.ts Move syntax formatting to prettier (#7454) 2019-05-29 13:57:26 +02:00
client.js
config.d.ts Move next-server back into next package (#8613) 2019-09-04 10:00:54 -04:00
config.js Move next-server back into next package (#8613) 2019-09-04 10:00:54 -04:00
constants.d.ts Remove default export from constants.d.ts (#8979) 2019-10-07 14:30:07 +02:00
constants.js Move next-server back into next package (#8613) 2019-09-04 10:00:54 -04:00
data.d.ts Remove re-exports of default when they don't exist (#9450) 2019-11-18 20:11:59 -06:00
data.js amp-bind data injection (#6840) 2019-04-02 16:09:34 +02:00
document.d.ts Move syntax formatting to prettier (#7454) 2019-05-29 13:57:26 +02:00
document.js
dynamic.d.ts Move next-server back into next package (#8613) 2019-09-04 10:00:54 -04:00
dynamic.js Move next-server back into next package (#8613) 2019-09-04 10:00:54 -04:00
error.d.ts Move syntax formatting to prettier (#7454) 2019-05-29 13:57:26 +02:00
error.js
experimental-script.d.ts Script loader component (#18281) 2020-12-01 19:10:16 +01:00
experimental-script.js Script loader component (#18281) 2020-12-01 19:10:16 +01:00
head.d.ts Move next-server back into next package (#8613) 2019-09-04 10:00:54 -04:00
head.js Move next-server back into next package (#8613) 2019-09-04 10:00:54 -04: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
license.md Update license year for all packages 2021-01-11 11:12:19 +01:00
link.d.ts Move syntax formatting to prettier (#7454) 2019-05-29 13:57:26 +02:00
link.js
package.json perf(next): use require.resolve instead of resolve (#19518) 2021-01-11 14:43:08 +00:00
README.md Update logo for dark mode (#20047) 2020-12-09 23:57:07 +00:00
router.d.ts Move syntax formatting to prettier (#7454) 2019-05-29 13:57:26 +02:00
router.js
taskfile-babel.js ncc 0.25.0 upgrade and fixes (#18873) 2020-11-06 02:33:14 +00:00
taskfile-ncc.js Update terser-webpack-plugin to support webpack 4 (#20089) 2020-12-12 20:28:53 +00:00
taskfile.js perf(next): use require.resolve instead of resolve (#19518) 2021-01-11 14:43:08 +00:00
tsconfig.json Move next-server back into next package (#8613) 2019-09-04 10:00:54 -04: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.

Authors