Commit graph

18885 commits

Author SHA1 Message Date
vercel-release-bot
a1e3888364 v14.0.5-canary.32 2023-12-30 23:21:17 +00:00
Lee Robinson
9986e82263
examples: Update next-forms example (#60052)
- Remove `experimental_` import for `useFormStatus`
- Update all dependencies
- Move to `postgres` so it works with any Postgres provider
- Fix a TypeScript issue
- Use `next dev --turbo`
2023-12-30 11:17:14 -06:00
vercel-release-bot
33f9b344d7 v14.0.5-canary.31 2023-12-29 23:21:55 +00:00
Lee Robinson
df14fdfa25
docs: fix typo for useFormState (#60010) 2023-12-28 18:22:11 -06:00
vercel-release-bot
cd740cd028 v14.0.5-canary.30 2023-12-28 23:22:17 +00:00
Ian Macartney
7343af9deb
examples: Update Convex Example (#59789)
Co-authored-by: Lee Robinson <me@leerob.io>
2023-12-28 00:25:14 -06:00
Lee Robinson
548a07ff6b
docs: opengraph / twitter image needs absolute URL (#59985) 2023-12-27 22:48:56 -06:00
Lee Robinson
9e37c327a4
docs: small changes to linking docs (#59982) 2023-12-27 22:48:21 -06:00
Ankit Kashyap
4b68d55b39
examples: Supabase rename .env.local.example to .env.example (#59984) 2023-12-27 22:47:45 -06:00
vercel-release-bot
0c75f1cf6b v14.0.5-canary.29 2023-12-27 23:21:52 +00:00
Shreyans Jain
5f2d7b691f
docs: add note that contentlayer is unmaintained (#59927)
Co-authored-by: Lee Robinson <me@leerob.io>
2023-12-27 11:09:38 -06:00
Jordy van den Aardweg
f8ba588ce4
docs: Update Middleware docs on ignoring prefetches (#56799)
Co-authored-by: Lee Robinson <me@leerob.io>
2023-12-27 11:02:01 -06:00
Michael Novotny
7e00d1871c
docs: Updates "No Before Interactive" error message for App router (#56033)
Co-authored-by: Lee Robinson <me@leerob.io>
2023-12-27 10:54:17 -06:00
Shahriar
332bf6d4f8
docs: remove incorrect async components in parallel routes docs (#59966)
Co-authored-by: Lee Robinson <me@leerob.io>
2023-12-27 10:45:14 -06:00
Dhaya
2c811af22e
examples: Upgrade with-algolia-react-instantsearch example to latest major version and use app router (#59961)
Co-authored-by: Lee Robinson <me@leerob.io>
2023-12-27 10:44:32 -06:00
Mohammed Gadi
bc41a7f829
examples: Update .env.local.example of with-firebase (#59954) 2023-12-27 10:43:52 -06:00
Manu
02d390740b
docs: fix link to formEntries (#59935) 2023-12-27 10:42:17 -06:00
ash2048
6a23987282
docs: Fix typo in generate-sitemaps.mdx docs (#59964) 2023-12-27 10:40:51 -06:00
vercel-release-bot
fc25fcef3e v14.0.5-canary.28 2023-12-26 23:23:10 +00:00
Lee Robinson
7c7d981b2d
examples: progressive enhancement for Redis example (#59937)
The example had `useOptimistic` and wasn't structured so that the
browser could fall back to `action` if JS was still loading or disabled.
2023-12-25 20:07:13 -06:00
vercel-release-bot
247f9e8374 v14.0.5-canary.27 2023-12-25 23:21:49 +00:00
Michael H
eebad9c939
docs: Add media example for icon metadata (#56141)
Co-authored-by: Lee Robinson <me@leerob.io>
2023-12-25 09:19:33 -06:00
Luke Schlangen
a0b661de8d
examples: remove broken deploy button (#58794) 2023-12-25 09:03:27 -06:00
vercel-release-bot
ebc4eaaa25 v14.0.5-canary.26 2023-12-24 23:21:31 +00:00
Jiachi Liu
365a0492d0
docs: fix prettier lint (#59918)
x-ref:
https://github.com/vercel/next.js/actions/runs/7315608759/job/19929482613

Closes NEXT-1928
2023-12-24 22:06:28 +01:00
Lee Robinson
0fc1d9e982
examples: update Redis to App Router (#59311) 2023-12-24 10:09:23 -06:00
Igor Varyvoda
d4b7c86ecf
docs: add Sirv loader for next/image (#57102)
Co-authored-by: Lee Robinson <me@leerob.io>
2023-12-24 10:03:50 -06:00
Lee Robinson
142e7080a5
docs: clarify setting and reading cookies from Route Handlers (#59915)
Replaces https://github.com/vercel/next.js/pull/57052
2023-12-24 10:02:50 -06:00
vinay
3b64a53e59
docs: remove old links for examples (#57891)
Co-authored-by: Lee Robinson <me@leerob.io>
2023-12-24 09:47:16 -06:00
Divine Quansah
ab16e51cf1
docs: fix import statement for next/og (#57810) 2023-12-24 09:45:21 -06:00
Harits Syah
768d2174eb
docs: add type to import statement (#57701) 2023-12-24 09:42:43 -06:00
vinay
ee4ff03828
docs: Add sensible name for cookie deleting functions (#57893) 2023-12-24 09:40:59 -06:00
Ahmed Abdelbaset
500a3f8f00
docs: fix typo (#59897) 2023-12-24 09:11:46 -06:00
vercel-release-bot
abcd10a039 v14.0.5-canary.25 2023-12-23 23:21:52 +00:00
Jiachi Liu
c4ba419d5c
Alias nextjs api entry to esm version for app router (#59852)
## What

When users specify `"type": "module"` in Next.js app, especially with
`create-next-app`, `Image` component is not working. An error
`Unsupported Server Component type: {...}` is thrown.

## Why

`next/image` API is mixing with a client component as default export and
a named export as server component. But the entry file of the API is
still CJS file, which will import the module as the object. So you'll
get `{ default, unstable_getImageProps }` when you do `import Image from
'next/image'` instead of `Image` component itself, where the CJS module
load all the exports as an object. This is expected behavior for ESM but
breaks the usage.

It only errors when you're using js extensions, if you're using
typescript, it still works. If you're using turbopack, it works in dev
mode.

This is also because webpack can't analyze the exports from CJS module
of that `next/image` entry file. Usually we can assign the default
export to the module itself, then attach other named exports onto it, so
the default export equals the `module.exports` itself. But for
`next/image` since the default export is an client component, doing that
will error with React as you cannot modify the react client reference.
Turbopack doesn't use the same way to analyze the default export, so it
doesn't have this problem.

## How

We create few ESM version of entry files of nextjs APIs, then pick up
them to let app router for bundling, instead of using the `next/<api
name>.js` CJS files. Those ESM entries still point to the `next/dist/..`
CJS files. In this way webpack and directly gets the exports from the
`next/dist/...` files and be aware of the module exports. No more CJS
module wrapping the ESM module, the default and named exports can
preserve correctly.

Fixes #54777
Closes NEXT-1774
Closes NEXT-1879
Closes NEXT-1923
2023-12-23 17:46:50 +01:00
Lee Robinson
3d9a1b481e
examples: add required env vars to auth example. (#59901) 2023-12-23 10:27:33 -06:00
Lee Robinson
4225da8cba
examples: Add new NextAuth.js example (#56914) 2023-12-23 10:21:26 -06:00
vercel-release-bot
c5b5b1e3a3 v14.0.5-canary.24 2023-12-22 23:22:32 +00:00
Nate Moore
2336274a2e
docs: Add cwd to VSCode debugging setup steps (#58689) 2023-12-22 16:26:04 -06:00
Ryo Matsukawa
7a18e6da37
docs: Rename React Query to TanStack Query (#59004) 2023-12-22 16:25:14 -06:00
Remco Haszing
34a5ef2189
docs: Mention remark-mdx-frontmatter in frontmatter docs (#59238) 2023-12-22 16:23:28 -06:00
Lisa Ferguson
b57a2c809d
docs: fix TS code snippet for MDX example (#57988) 2023-12-22 16:22:46 -06:00
Michael Novotny
f999d639b0
docs: Updates references for styled-components configuration in next.config.js (#59495) 2023-12-22 16:21:41 -06:00
Steven Kamwaza
19dac217b6
docs: fix not-found file paths (#59478) 2023-12-22 16:18:27 -06:00
Yeseul, Kim
c7b2422046
docs: Add Chakra UI setup guide (#59275) 2023-12-22 16:16:27 -06:00
Loris Sigrist
19eea58d69
docs: Remove typesafe-i18n from third-party i18n options (#59624) 2023-12-22 16:14:25 -06:00
James Burgess
1529b50af6
docs: correct type in sitemap.mdx (#59787) 2023-12-22 16:09:59 -06:00
Rajdeep singh
3e26253c31
docs: add version history for unstable_cache (#59799) 2023-12-22 16:09:32 -06:00
minaelee
a3fb38a475
docs: Minor grammar edits (#59887)
Co-authored-by: Lee Robinson <me@leerob.io>
2023-12-22 16:08:33 -06:00
minaelee
2d50879f0f
docs: fix run-on and definition of trailing slash redirect (#59889) 2023-12-22 16:05:23 -06:00