- 19 Oct, 2022 5 commits
-
-
Jiachi Liu authored
-
Jiachi Liu authored
For css-in-js libs like styled-jsx we don't recommend to use on server side since it will blow up the rsc payload during navigation. This upgration of styled-jsx includes `client-only` as dependency so that it will throw when it's been used on serevr layer x-ref: https://github.com/vercel/styled-jsx/pull/816
-
Donny/강동윤 authored
This PR updates swc crates to https://github.com/swc-project/swc/commit/287c2f2941c0f9858533f8eb6059f0d32fa29dbc - Closes https://github.com/vercel/next.js/issues/41527.
-
Steven authored
Remove `browsersListForSwc` since it is enabled by default now, and disable `legacyBrowsers` by default. This PR also bumps the default browserslist to the following: - Chrome 64+ - Edge 79+ - Firefox 67+ - Opera 51+ - Safari 12+ See related RFC: - Closes #33227 Co-authored-by:JJ Kasper <22380829+ijjk@users.noreply.github.com>
-
-
- 18 Oct, 2022 19 commits
-
-
Jiachi Liu authored
Inline a react and react-dom for app dir, when `appDir` flag is enabled opt into the built-in version for all. For server layer react, use the react share subset for server components. For all server side of react-dom usage, use the server-rendering-stub. Co-authored-by:
Shu Ding <g@shud.in> Co-authored-by:
JJ Kasper <jj@jjsweb.site>
-
Steven authored
This PR fixes links to `next/legacy/image` (demo, deploy, etc)
-
JJ Kasper authored
-
Shu Ding authored
There is this `createAbsolutePath` function that concatenates a virtual route and a dir path. The virtual route uses the posix separator `/` but the dir path uses `\` in Windows. Here's an example of the error: ``` error - ./node_modules/.pnpm/next@12.3.2-canary.29_ikefsjgelhtr3cq7h24gohqzbe/node_modules/next/dist/build/webpack/loaders/next-app-loader.js?name=app%2Fpage&appPaths=%2Fpage&pagePath=private-next-app-dir% 2Fpage.tsx&appDir=E%3A%5CWorkSpace%5C2022%5Csongbook.studio%5Capp&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js! Module parse failed: Octal literal in strict mode (9:41) ``` ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a 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 a 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/examples/adding-examples.md)
-
Steven authored
The `target: serverless` config was deprecated a year ago starting in [Next.js 12](https://nextjs.org/blog/next-12). Tests were disabled in #41252 so we can now remove `target: serverless` and all usage of `target` in `next.config.js`. Co-authored-by:
Balázs Orbán <info@balazsorban.com> Co-authored-by:
JJ Kasper <jj@jjsweb.site>
-
Steven authored
Follow up to: - #41506
-
Balázs Orbán authored
-
JJ Kasper authored
This ensures we properly clear the `sc_client` component cache from `react-server-dom-webpack` in development so that HMR works properly after a refresh. ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have a helpful link attached, see `contributing.md` Fixes: [slack thread](https://vercel.slack.com/archives/C043ANYDB24/p1666051202574509)
-
Jiachi Liu authored
x-ref: [slack-thread](https://vercel.slack.com/archives/C035J346QQL/p1665425741387879)
-
Anish Paudel authored
Closes: https://github.com/vercel/next.js/issues/41507
-
JJ Kasper authored
x-ref: [slack thread](https://vercel.slack.com/archives/CGU8HUTUH/p1666067928896099?thread_ts=1666066448.770739&cid=CGU8HUTUH)
-
Tim Neutkens authored
Add failing test for the back button download bug. Created it as a new app given that adding it to the existing `app` suite did not reproduce the issue for some reason. The underlying reason is that we need to add `Vary: __rsc__, __next_router_prefetch__` to ensure Chrome does not cache the response and serve it on back button. The download was caused by the `application/octet-stream` content type, but that was just a consequence of serving the wrong response. <!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change that you're making: --> ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a 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 a 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/examples/adding-examples.md) Co-authored-by:
JJ Kasper <jj@jjsweb.site>
-
Lee Robinson authored
Didn't realize the `remotePatterns` usage was already in here (not live yet, but merged into `canary`) - so just also added on this link for the end
👍 -
Seiya Nuta authored
<!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change that you're making: --> Consider the following middleware which redirects to `/path/to#fragment`. ```ts import { NextResponse } from 'next/server'; export async function middleware(request) { const url = new URL('/path/to#fragment', request.url); return NextResponse.redirect(url); } ``` However, it actually redirects to `/path/to`, namely it discards the fragment part in the destination URL `#fragment`. This is because `NextURL.toString()` does not append that part. This PR fixes the bug. ## Bug - [ ] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have a 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 a 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/examples/adding-examples.md) -
Shu Ding authored
It’s possible that global CSS imports, that come from node_modules, are marked as side effect free because of possible `sideEffects: false` in the external package's package.json. In that case, we still need to handle global CSS imports as side effects on the server because we need to collect them and avoid tree-shaking for these modules. You can take a look at the test case to see what exactly happened. ## Bug - [ ] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have a 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 a 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/examples/adding-examples.md)
-
Shu Ding authored
There is no need to use the href as key in our case because it's pure during SSR and it won't re-order on the client. By using `index` we can avoid some duplicate bytes here:  ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a 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 a 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/examples/adding-examples.md)
-
Tonye Jack authored
## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a 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 a 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/examples/adding-examples.md)
-
Tim Neutkens authored
- Enable newNextLinkBehavior. See #36436 - Run next/link codemod on test suite Note that from when this lands on apps trying canary will need to run the new-link codemod in order to upgrade. Ideally we have to detect `<a>` while rendering the new link and warn for it. Co-authored-by:Steven <steven@ceriously.com>
-
- 17 Oct, 2022 9 commits
-
-
Alexander Sviridov authored
fixes https://github.com/vercel/next.js/issues/41456 When we check if app folder exists, check for src/app path too ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have a 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 a 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/examples/adding-examples.md) Co-authored-by:
Jiachi Liu <inbox@huozhi.im> Co-authored-by:
JJ Kasper <jj@jjsweb.site>
-
Felipe Barso authored
Fixes #39262 The solution is to call `stream.push(null)` to trigger the `end` event which allows `getRawBody` to run completely. <!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change that you're making: --> ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have a 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 a helpful link attached, see `contributing.md` ## Documentation / Examples - [x] Make sure the linting passes by running `pnpm lint` - [x] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md) Co-authored-by:
JJ Kasper <jj@jjsweb.site>
-
Charly POLY authored
Update the `with-routes-graphql` example to [GraphQL Yoga](https://www.the-guild.dev/graphql/yoga-server/) new major ([migration guide](https://www.the-guild.dev/graphql/yoga-server/v3/migration/migration-from-yoga-v2)).
-
Tim Neutkens authored
Co-authored-by:Balázs Orbán <info@balazsorban.com>
-
Donny/강동윤 authored
-
Steven authored
- Follow up to https://github.com/vercel/next.js/pull/41150
-
Steven authored
This PR updates the docs for the following code change: - #41399 There are a few updates here: - [x] Update docs - [x] Update links to docs inside component - [x] Update examples - [x] Fix corner cases in codemod
-
Steven authored
- Fix typo - Add comment - Link back to react docs - Remove unnecessary variable
-
Shu Ding authored
There is no need to have a separate `framework` chunk for React and React DOM, as they're already included in the `main-app` entry. With this PR, React and React DOM will be included in `main-app` directly and app is no longer depending on the `framework` chunk. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a 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 a 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/examples/adding-examples.md)
-
- 16 Oct, 2022 4 commits
-
-
Tim Neutkens authored
Slightly different version of #41020 where it does not end up being an unknown event. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a 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 a 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/examples/adding-examples.md)
-
Sukka authored
Add missing `assetPrefix` for link tags (`@next/font` and CSS). The PR also merges multiple duplicated `renderOpt.assetPrefix || ''`.
-
Tim Neutkens authored
Hannes is going to change the approach to be compatible with static. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a 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 a 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/examples/adding-examples.md)
-
Tim Neutkens authored
-
- 15 Oct, 2022 3 commits
-
-
Tim Neutkens authored
Renames `router.reload` to `router.refresh` to better reflect that it refreshes the rendered page instead of being a blank slate. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a 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 a 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/examples/adding-examples.md)
-
Sukka authored
The PR continues from #41392. In #41392 the `dev ? cache-busting : empty` is executed per stylesheet instead of per page rendering. Since rendering link tags would be a hot path at the server, it might have accidentally introduced a performance overhead. The PR fixes that. Note, this change also makes `Date.now()` only execute once instead of per stylesheets, however, this will most likely not cause any issues.
-
Tim Neutkens authored
Similar to #40872 `useSearchParams` now returns a `URLSearchParams` instance instead of a plain object. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a 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 a 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/examples/adding-examples.md)
-