Commit graph

1457 commits

Author SHA1 Message Date
JJ Kasper
c7162c42b2
v13.1.2-canary.4 2023-01-09 16:55:34 -08:00
Tim Neutkens
8266bc280a v13.1.2-canary.3 2023-01-09 09:08:50 +01:00
JJ Kasper
526c7cd535
v13.1.2-canary.2 2023-01-06 14:25:16 -08:00
Tim Neutkens
35264c3659
Add support for rendering MDX as a server component (#44651)
Adds support for rendering MDX as a Server Component.

The main reason a MDX file couldn't be rendered as a Server Component is
that `@mdx-js/react` has a legacy/deprecated context setup in the file.
Because of calling `React.createContext` the MDX file couldn't be a
Server Component.

I've added support for a special file `mdx-components.tsx` (or `.js`) at
the root of the project (can be `src` dir too).
By using mdx-components you don't need a global context provider which
in turn makes MDX compatible to be rendered as a Server Component.

Note: this changes `@next/mdx` to add support for that file so it has to
be landed first before the example works.

<!--
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`](https://github.com/vercel/next.js/blob/canary/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`
- [ ]
[e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
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`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && 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>
2023-01-06 13:09:05 -08:00
JJ Kasper
2c49972219
v13.1.2-canary.1 2023-01-05 14:20:56 -08:00
JJ Kasper
90b86be6dc
v13.1.2-canary.0 2023-01-03 17:21:41 -08:00
Tim Neutkens
b2e9431bb4
Update license year (#44403) 2023-01-01 11:12:49 +01:00
Tim Neutkens
4ac737ee6b v13.1.1 2022-12-24 10:30:43 +01:00
Tim Neutkens
f0a8b7ec6e v13.1.1-canary.1 2022-12-24 10:28:44 +01:00
Shu Ding
44548dda36
v13.1.1-canary.0 2022-12-23 21:04:56 +01:00
Tim Neutkens
02489c2f4a v13.1.0 2022-12-22 15:57:47 +01:00
Tim Neutkens
87ca16ff8d v13.0.8-canary.5 2022-12-22 15:36:13 +01:00
Tim Neutkens
0572e218af v13.0.8-canary.4 2022-12-22 08:35:43 +01:00
JJ Kasper
13a3a9c97a
v13.0.8-canary.3 2022-12-21 16:55:10 -06:00
JJ Kasper
0ac617eccd
v13.0.8-canary.2 2022-12-20 16:18:54 -06:00
JJ Kasper
7368b6f9e6
v13.0.8-canary.1 2022-12-19 17:14:36 -08:00
Jiachi Liu
0715af8e6a v13.0.8-canary.0 2022-12-15 20:54:35 +01:00
Tim Neutkens
892eb618f7 v13.0.7 2022-12-15 12:21:57 +01:00
Tim Neutkens
6a00737533 v13.0.7-canary.7 2022-12-15 12:04:40 +01:00
JJ Kasper
0269f1cbda
v13.0.7-canary.6 2022-12-13 09:21:39 -08:00
JJ Kasper
5e50fce03b
v13.0.7-canary.5 2022-12-12 16:12:38 -08:00
JJ Kasper
9d97a1e34a
v13.0.7-canary.4 2022-12-09 09:04:30 -06:00
Jiachi Liu
57515a767a v13.0.7-canary.3 2022-12-07 23:40:19 +01:00
Tim Neutkens
ea21c66231 v13.0.7-canary.2 2022-12-06 13:42:44 +01:00
JJ Kasper
9329743744
v13.0.7-canary.1 2022-12-02 23:36:18 -08:00
JJ Kasper
166e5fb9b9
v13.0.7-canary.0 2022-12-01 21:50:10 -08:00
JJ Kasper
5003add92b
v13.0.6 2022-12-01 19:17:58 -08:00
JJ Kasper
5f420f710f
v13.0.6-canary.4 2022-12-01 18:20:36 -08:00
JJ Kasper
fbc98abab3
v13.0.6-canary.3 2022-11-30 21:14:26 -08:00
JJ Kasper
ae626c5628
v13.0.6-canary.2 2022-11-28 22:09:41 -08:00
Tim Neutkens
c16d4be4c6 v13.0.6-canary.1 2022-11-25 13:31:08 +01:00
JJ Kasper
29a913467f
v13.0.6-canary.0 2022-11-23 19:16:49 -08:00
JJ Kasper
f3a728bef1
v13.0.5 2022-11-23 14:00:15 -08:00
JJ Kasper
e079fbb10f
v13.0.5-canary.7 2022-11-23 12:09:15 -08:00
JJ Kasper
9fe5317417
v13.0.5-canary.6 2022-11-22 22:06:19 -08:00
Tim Neutkens
28454c6ddb v13.0.5-canary.5 2022-11-22 19:56:20 +01:00
JJ Kasper
7ae1cb8e8d
v13.0.5-canary.4 2022-11-21 17:03:50 -08:00
JJ Kasper
e3387dbb06
v13.0.5-canary.3 2022-11-19 20:12:30 -08:00
JJ Kasper
a35612aec9
v13.0.5-canary.2 2022-11-18 15:46:45 -08:00
JJ Kasper
ebbd9a98e9
v13.0.5-canary.1 2022-11-18 14:39:40 -08:00
JJ Kasper
24867fd785
v13.0.5-canary.0 2022-11-18 11:03:31 -08:00
JJ Kasper
58fa90f1bf
v13.0.4 2022-11-17 20:42:47 -08:00
JJ Kasper
ef81fc3f8d
v13.0.4-canary.5 2022-11-17 19:27:35 -08:00
JJ Kasper
ed4a14869c
v13.0.4-canary.4 2022-11-17 14:55:11 -08:00
JJ Kasper
3d4c038fa5
v13.0.4-canary.3 2022-11-16 15:44:30 -08:00
JJ Kasper
830b969414
v13.0.4-canary.2 2022-11-15 10:42:34 -08:00
JJ Kasper
3fc31f4afb
v13.0.4-canary.1 2022-11-15 08:35:42 -08:00
Tim Neutkens
79f7231406 v13.0.4-canary.0 2022-11-14 12:40:08 +01:00
JJ Kasper
4240dcc410
v13.0.3 2022-11-10 19:26:00 -08:00
JJ Kasper
895d895972
v13.0.3-canary.4 2022-11-10 17:50:06 -08:00