Skip to content

Commit

Permalink
Merge branch 'canary' into gadzik/hotfix-playwright
Browse files Browse the repository at this point in the history
  • Loading branch information
shuding authored Mar 22, 2024
2 parents b05c46e + 142b48f commit 05ff6c7
Show file tree
Hide file tree
Showing 93 changed files with 714 additions and 417 deletions.
70 changes: 35 additions & 35 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ swc_core = { version = "0.90.22", features = [
testing = { version = "0.35.20" }

# Turbo crates
turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240319.2" }
turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240321.3" }
# [TODO]: need to refactor embed_directory! macro usages, as well as resolving turbo_tasks::function, macros..
turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240319.2" }
turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240321.3" }
# [TODO]: need to refactor embed_directory! macro usage in next-core
turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240319.2" }
turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240321.3" }

# General Deps

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export const config = {
}
```

You can also ignore prefetches (from `next/link`) that don't need to go through the Middleware using the `missing` array:
You can also bypass Middleware for certain requests by using the `missing` or `has` arrays, or a combination of both:

```js filename="middleware.js"
export const config = {
Expand All @@ -116,6 +116,20 @@ export const config = {
{ type: 'header', key: 'purpose', value: 'prefetch' },
],
},

{
source: '/((?!api|_next/static|_next/image|favicon.ico).*)',
has: [
{ type: 'header', key: 'next-router-prefetch' },
{ type: 'header', key: 'purpose', value: 'prefetch' },
],
},

{
source: '/((?!api|_next/static|_next/image|favicon.ico).*)',
has: [{ type: 'header', key: 'x-present' }],
missing: [{ type: 'header', key: 'x-missing', value: 'prefetch' }],
},
],
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ Next.js includes a [short list of popular packages](https://github.com/vercel/ne
- `jest`
- `jsdom`
- `libsql`
- `lodash`
- `mdx-bundler`
- `mongodb`
- `mongoose`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ By default, Next.js includes its own server with `next start`. If you have an ex
>
> - Before deciding to use a custom server, please keep in mind that it should only be used when the integrated router of Next.js can't meet your app requirements. A custom server will remove important performance optimizations, like **serverless functions** and **[Automatic Static Optimization](/docs/pages/building-your-application/rendering/automatic-static-optimization).**
> - A custom server **cannot** be deployed on [Vercel](https://vercel.com/solutions/nextjs).
> - Standalone output mode, does not trace custom server files and this mode outputs a separate minimal `server.js` file instead.
Take a look at the following example of a custom server:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ bun add next@12 react@17 react-dom@17 eslint-config-next@12

[Minimum Node.js Version](https://nodejs.org/en/) - The minimum Node.js version has been bumped from `12.0.0` to `12.22.0` which is the first version of Node.js with native ES Modules support.

[Minimum React Version](https://reactjs.org/docs/add-react-to-a-website.html) - The minimum required React version is `17.0.2`. To upgrade you can run the following command in the terminal:
[Minimum React Version](https://react.dev/learn/add-react-to-an-existing-project) - The minimum required React version is `17.0.2`. To upgrade you can run the following command in the terminal:

```bash filename="Terminal"
npm install react@latest react-dom@latest
Expand Down
Loading

0 comments on commit 05ff6c7

Please sign in to comment.