mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
docs: fix typos and links (#92541)
This PR cleans up small documentation and error-page issues: correct TypeScript spelling where it was written as “Typescript”, use the proper GitHub label in links, fix the MDN URL for `Map.prototype.values` in the middleware upgrade guide. No runtime or API behavior changes.
This commit is contained in:
@@ -4,9 +4,9 @@ title: ESM packages need to be imported
|
||||
|
||||
## Why This Error Occurred
|
||||
|
||||
Packages in node_modules that are published as EcmaScript Module, need to be `import`ed via `import ... from 'package'` or `import('package')`.
|
||||
Packages in node_modules that are published as ECMAScript Module, need to be `import`ed via `import ... from 'package'` or `import('package')`.
|
||||
|
||||
You get this error when using a different way to reference the package, e. g. `require()`.
|
||||
You get this error when using a different way to reference the package, e.g. `require()`.
|
||||
|
||||
## Possible Ways to Fix It
|
||||
|
||||
|
||||
@@ -197,7 +197,7 @@ export default async function handler(req: NextRequest) {
|
||||
|
||||
### Explanation
|
||||
|
||||
Based on beta feedback, we are changing the Cookies API in `NextRequest` and `NextResponse` to align more to a `get`/`set` model. The `Cookies` API extends Map, including methods like [entries](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map/entries) and [values](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map/entries).
|
||||
Based on beta feedback, we are changing the Cookies API in `NextRequest` and `NextResponse` to align more to a `get`/`set` model. The `Cookies` API extends Map, including methods like [entries](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map/entries) and [values](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map/values).
|
||||
|
||||
### How to upgrade
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ export default async function ComponentThatWillBeExportedAsPage({ params, search
|
||||
export * from '.../some-file'
|
||||
```
|
||||
|
||||
It is unexpected that you would run the codemod and not successfully convert all instances of `params` and `searchParams` to async or have a marker string to help you locate unconverted cases. If you do find yourself in this situation please report this to [Next.js on Github](https://github.com/vercel/next.js/issues).
|
||||
It is unexpected that you would run the codemod and not successfully convert all instances of `params` and `searchParams` to async or have a marker string to help you locate unconverted cases. If you do find yourself in this situation please report this to [Next.js on GitHub](https://github.com/vercel/next.js/issues).
|
||||
|
||||
## Useful Links
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ export default async function GET(request) {
|
||||
}
|
||||
```
|
||||
|
||||
It is unexpected that you would run the codemod and not successfully convert all instances of `params` and `searchParams` to async or have a marker string to help you locate unconverted cases. If you do find yourself in this situation please report this to [Next.js on Github](https://github.com/vercel/next.js/issues).
|
||||
It is unexpected that you would run the codemod and not successfully convert all instances of `params` and `searchParams` to async or have a marker string to help you locate unconverted cases. If you do find yourself in this situation please report this to [Next.js on GitHub](https://github.com/vercel/next.js/issues).
|
||||
|
||||
## Useful Links
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ Next.js now uses Rust-based compiler [SWC](https://swc.rs/) to compile JavaScrip
|
||||
|
||||
Next.js provides full backwards compatibility with applications that have [custom Babel configuration](/docs/pages/guides/babel). All transformations that Next.js handles by default like styled-jsx and tree-shaking of `getStaticProps` / `getStaticPaths` / `getServerSideProps` have been ported to Rust.
|
||||
|
||||
When an application has custom Babel configuration Next.js will automatically opt-out of using SWC for compiling JavaScript/Typescript and will fall back to using Babel in the same way that it was used in Next.js 11.
|
||||
When an application has custom Babel configuration Next.js will automatically opt-out of using SWC for compiling JavaScript/TypeScript and will fall back to using Babel in the same way that it was used in Next.js 11.
|
||||
|
||||
Many of the integrations with external libraries that currently require custom Babel transformations will be ported to Rust-based SWC transforms in the near future. These include but are not limited to:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user