rsnext/packages/next/client
Shu Ding d592d20673
Avoid bundling next/script in the server build by default (#40013)
We only use `if (child.type === Script)` on the server side to check the
element type, that's unnecessary because we can add a special flag for
that (`__nextScript` in this PR).

This reduces the server bundle by ~13kb if `next/script` is not imported
by the user.

## Bug

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

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The examples guidelines are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-08-28 13:36:42 -05:00
..
components Enable @typescript-eslint/no-use-before-define for functions (#39602) 2022-08-15 10:29:51 -04:00
dev Enable @typescript-eslint/no-use-before-define for functions (#39602) 2022-08-15 10:29:51 -04:00
future Fix next/future/image incorrectly warning for fill + blur (#39986) 2022-08-26 16:03:51 -05:00
portal refactor(portal): remove useRef from portal component (#39792) 2022-08-21 09:39:43 +00:00
add-base-path.ts Extract router utils to common functions (#37313) 2022-05-30 20:19:37 +02:00
add-locale.ts Extract router utils to common functions (#37313) 2022-05-30 20:19:37 +02:00
app-index.tsx Refactor client CSS imports (#39758) 2022-08-22 18:09:56 -05:00
app-next-dev.js Leverage mini css plugin hmr for app dir (#38830) 2022-07-21 14:38:04 +02:00
app-next.js Handle on-demand-entries and error overlay for server components (#38480) 2022-07-10 19:18:48 +02:00
detect-domain-locale.ts Extract router utils to common functions (#37313) 2022-05-30 20:19:37 +02:00
get-domain-locale.ts Extract router utils to common functions (#37313) 2022-05-30 20:19:37 +02:00
has-base-path.ts Extract router utils to common functions (#37313) 2022-05-30 20:19:37 +02:00
head-manager.ts Migrate head side effects to hooks (#37526) 2022-06-08 11:26:57 +00:00
image.tsx Enable @typescript-eslint/no-use-before-define for functions (#39602) 2022-08-15 10:29:51 -04:00
index.tsx Enable @typescript-eslint/no-use-before-define for functions (#39602) 2022-08-15 10:29:51 -04:00
link.tsx Add handling for prefetching onTouchStart and initial mobile testing (#38805) 2022-07-25 19:04:03 +00:00
next-dev.js Add hard navigation guard and fix middleware rewrite cases (#37815) 2022-06-20 11:31:19 +00:00
next.js Split up & tweak next/client initialization (#33838) 2022-03-07 17:09:55 +00:00
normalize-locale-path.ts Extract router utils to common functions (#37313) 2022-05-30 20:19:37 +02:00
normalize-trailing-slash.ts Extract router utils to common functions (#37313) 2022-05-30 20:19:37 +02:00
page-loader.ts fix: improve logging for _devPagesManifest.json loading failures (#38046) 2022-08-07 19:36:03 +00:00
performance-relayer.ts add method to measure Interaction to Next Paint (INP) (#36490) 2022-06-07 18:28:58 +00:00
remove-base-path.ts Extract router utils to common functions (#37313) 2022-05-30 20:19:37 +02:00
remove-locale.ts Extract router utils to common functions (#37313) 2022-05-30 20:19:37 +02:00
request-idle-callback.ts upgrade to typescript 4.4.3 (#29112) 2021-09-16 18:06:57 +02:00
route-announcer.tsx Hoist styles for Route Announcer 📢 (#39331) 2022-08-05 09:42:55 +00:00
route-loader.ts Fix: only contain middleware in dev middleware manifest (#39217) 2022-08-01 13:23:24 +00:00
router.ts Enable @typescript-eslint/no-use-before-define for functions (#39602) 2022-08-15 10:29:51 -04:00
script.tsx Avoid bundling next/script in the server build by default (#40013) 2022-08-28 13:36:42 -05:00
trusted-types.ts Route Loader Trusted Types Violation Fix (#34730) 2022-05-03 23:22:08 +00:00
use-intersection.tsx refactor(use-intersection): remove useRef usage (#39791) 2022-08-21 10:10:09 +00:00
with-router.tsx Update to latest babel versions (#28174) 2021-08-17 09:18:08 +02:00