forked from vercel/next.js
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commit f16ee05 Author: hiro <hiroyuki.kikuchi@zozo.com> Date: Thu Mar 24 10:02:40 2022 +0900 Fix typo in docs (vercel#35561) The following files have been modified. - `docs/api-reference/next.config.js/rewrites.md` - `docs/basic-features/script.md` ## Documentation / Examples - [x] Make sure the linting passes by running `yarn lint` commit ef7b535 Author: Steven <steven@ceriously.com> Date: Wed Mar 23 18:33:47 2022 -0400 Fix `next info` accidentally printing stderr (vercel#35556) I noticed a few issues that had "Output from `next info`" with the first line as ``` /bin/sh: pnpm: command not found ``` This was because `execSync()` was still printing to stderr when a command was not found. Changing to `execFileSync()` fixed it so we no longer print to stderr when a command is not found. commit 59905c1 Author: LongYinan <lynweklm@gmail.com> Date: Thu Mar 24 04:47:44 2022 +0800 Fix styled transform in next-swc/emotion (vercel#35527) Fix vercel#35525 ## Bug - [x] 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 `yarn lint` commit ebe1b4c Author: Shu Ding <g@shud.in> Date: Wed Mar 23 20:20:36 2022 +0100 Upgrade react-server-dom-webpack (vercel#35524) There're some changes since our last update that we'll need (e.g. server context). ## 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 `yarn lint` commit 432261a Author: JJ Kasper <jj@jjsweb.site> Date: Wed Mar 23 13:43:12 2022 -0500 Add link for revalidate from notFound section (vercel#35553) commit 2cf6696 Author: Jiachi Liu <inbox@huozhi.im> Date: Wed Mar 23 16:19:58 2022 +0100 Merge rsc queries handling (vercel#35545) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> commit 9fef0d5 Author: JJ Kasper <jj@jjsweb.site> Date: Wed Mar 23 09:28:04 2022 -0500 Normalize ssgCacheKey for /index with minimalMode de-duping (vercel#35536) * Normalize ssgCacheKey for /index * apply test changes to i18n suite as well commit 72478c5 Author: JJ Kasper <jj@jjsweb.site> Date: Tue Mar 22 13:58:55 2022 -0500 Update next/link error when no children are provided (vercel#35453) * Update next/link error when no children are provided * update manifest * Apply suggestions from code review Co-authored-by: Balázs Orbán <info@balazsorban.com> commit 6da7691 Author: Malte Ubl <cramforce@users.noreply.github.com> Date: Tue Mar 22 07:54:05 2022 -0700 Reduce hello-world middleware bundle size from 128k to 88k (vercel#35512) Moves two utility functions from `server/router.ts` into their own file. This avoids the middleware pulling in the full Next.js router into its bundle. There are probably more opportunities like this, but this is a good start. Middleware should likely be bundled by a non-chunking optimizing compiler. commit 860c97c Author: Heyang Zhou <zhy20000919@hotmail.com> Date: Tue Mar 22 21:20:57 2022 +0800 SWC import modularization plugin (vercel#34969) commit 78831c3 Author: Steven <steven@ceriously.com> Date: Tue Mar 22 09:00:31 2022 -0400 v12.1.1-canary.17 commit a2accb2 Author: JJ Kasper <jj@jjsweb.site> Date: Tue Mar 22 00:03:42 2022 -0500 Update trace ignore check to check reasons correctly (vercel#35511) commit c261924 Author: OJ Kwon <kwon.ohjoong@gmail.com> Date: Mon Mar 21 17:09:03 2022 -0700 feat(telemetry): report swc target triple to telemetry (vercel#35420) commit af95b0c Author: Luka Hartwig <mail@lukahartwig.de> Date: Tue Mar 22 00:54:43 2022 +0100 Server component docs use wrong next version (vercel#35313) The docs for the react server components preview refer refer to `next@latest` which doesn't work. The linked demo uses `canary` so I replaced it in the install command. commit 92da36f Author: JJ Kasper <jj@jjsweb.site> Date: Mon Mar 21 18:33:48 2022 -0500 v12.1.1-canary.16 commit cd47984 Author: Thiago M <thiagotm@outlook.com> Date: Mon Mar 21 14:06:04 2022 -0300 clarify use of Script (vercel#35491) Leave more clear that <Script> component can't be used inside Head. Current it says "without need", which don't implies it can't be used. ## 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 - [x] Make sure the linting passes by running `yarn lint` commit da3760b Author: JJ Kasper <jj@jjsweb.site> Date: Mon Mar 21 10:00:07 2022 -0500 Use check on prerender test assertion (vercel#35482) commit 40a5c94 Author: Nelo <correo@nelo.dev> Date: Mon Mar 21 15:24:19 2022 +0100 Fix typo in getServerSideProps doc page (vercel#35467) While reading the documentation, I noticed that this paragraph was not correctly written and was hard to read. I fixed it adding a dot. ## Documentation / Examples - [ ] Make sure the linting passes by running `yarn lint`
- Loading branch information
Showing
80 changed files
with
2,088 additions
and
360 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# No children were passed to <Link> | ||
|
||
#### Why This Error Occurred | ||
|
||
In your application code `next/link` was used without passing a child: | ||
|
||
For example: | ||
|
||
```js | ||
import Link from 'next/link' | ||
|
||
export default function Home() { | ||
return ( | ||
<Link href="/about"></Link> | ||
// or | ||
<Link href='/about' /> | ||
) | ||
} | ||
``` | ||
|
||
#### Possible Ways to Fix It | ||
|
||
Make sure one child is used when using `<Link>`: | ||
|
||
```js | ||
import Link from 'next/link' | ||
|
||
export default function Home() { | ||
return ( | ||
<Link href="/about"> | ||
<a>To About</a> | ||
</Link> | ||
) | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
# vercel | ||
.vercel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Modularize Imports Example | ||
|
||
This example shows how to use the `modularizeImports` config option. | ||
|
||
## Preview | ||
|
||
Preview the example live on [StackBlitz](http://stackblitz.com/): | ||
|
||
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/vercel/next.js/tree/canary/examples/modularize-imports) | ||
|
||
## Deploy your own | ||
|
||
Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example): | ||
|
||
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https://github.com/vercel/next.js/tree/canary/examples/modularize-imports&project-name=modularize-imports&repository-name=modularize-imports) | ||
|
||
## How to use | ||
|
||
Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init) or [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) to bootstrap the example: | ||
|
||
```bash | ||
npx create-next-app --example modularize-imports modularize-imports-app | ||
# or | ||
yarn create next-app --example modularize-imports modularize-imports-app | ||
``` | ||
|
||
Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default function LeftHalf() { | ||
return <span>Modularize</span> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default function RightHalf() { | ||
return <span>Imports</span> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// import LeftHalf from './LeftHalf' | ||
// import RightHalf from './RightHalf' | ||
|
||
// Remove the exports here so that we can verify that `modularize-imports` is working. | ||
// export { LeftHalf, RightHalf }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module.exports = { | ||
experimental: { | ||
modularizeImports: { | ||
'../components/halves': { | ||
transform: '../components/halves/{{ member }}', | ||
}, | ||
}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"private": true, | ||
"scripts": { | ||
"dev": "next dev", | ||
"build": "next build", | ||
"start": "next start" | ||
}, | ||
"dependencies": { | ||
"next": "latest", | ||
"react": "^17.0.2", | ||
"react-dom": "^17.0.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { LeftHalf, RightHalf } from '../components/halves' | ||
|
||
const Index = () => ( | ||
<div> | ||
<LeftHalf /> | ||
<RightHalf /> | ||
</div> | ||
) | ||
|
||
export default Index |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,5 +16,5 @@ | |
"registry": "https://registry.npmjs.org/" | ||
} | ||
}, | ||
"version": "12.1.1-canary.15" | ||
"version": "12.1.1-canary.17" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.