diff --git a/examples/app-dir-mdx/.gitignore b/examples/mdx-pages/.gitignore similarity index 100% rename from examples/app-dir-mdx/.gitignore rename to examples/mdx-pages/.gitignore diff --git a/examples/with-mdx/README.md b/examples/mdx-pages/README.md similarity index 77% rename from examples/with-mdx/README.md rename to examples/mdx-pages/README.md index eddf23159096db..6e2705bc0a7967 100644 --- a/examples/with-mdx/README.md +++ b/examples/mdx-pages/README.md @@ -4,24 +4,24 @@ This example shows using [MDX](https://github.com/mdx-js/mdx) as top level pages ## Deploy your own -Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example) or preview live with [StackBlitz](https://stackblitz.com/github/vercel/next.js/tree/canary/examples/with-mdx) +Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example) or preview live with [StackBlitz](https://stackblitz.com/github/vercel/next.js/tree/canary/examples/mdx-pages) -[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vercel/next.js/tree/canary/examples/with-mdx&project-name=with-mdx&repository-name=with-mdx) +[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vercel/next.js/tree/canary/examples/mdx-pages&project-name=mdx-pages&repository-name=mdx-pages) ## 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), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example: ```bash -npx create-next-app --example with-mdx with-mdx-app +npx create-next-app --example mdx-pages mdx-pages-app ``` ```bash -yarn create next-app --example with-mdx with-mdx-app +yarn create next-app --example mdx-pages mdx-pages-app ``` ```bash -pnpm create next-app --example with-mdx with-mdx-app +pnpm create next-app --example mdx-pages mdx-pages-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)). diff --git a/examples/with-mdx/components/button.js b/examples/mdx-pages/components/button.js similarity index 100% rename from examples/with-mdx/components/button.js rename to examples/mdx-pages/components/button.js diff --git a/examples/with-mdx/next.config.js b/examples/mdx-pages/next.config.js similarity index 100% rename from examples/with-mdx/next.config.js rename to examples/mdx-pages/next.config.js diff --git a/examples/with-mdx/package.json b/examples/mdx-pages/package.json similarity index 100% rename from examples/with-mdx/package.json rename to examples/mdx-pages/package.json diff --git a/examples/with-mdx/pages/index.mdx b/examples/mdx-pages/pages/index.mdx similarity index 100% rename from examples/with-mdx/pages/index.mdx rename to examples/mdx-pages/pages/index.mdx diff --git a/examples/with-mdx-remote/.gitignore b/examples/mdx-remote/.gitignore similarity index 100% rename from examples/with-mdx-remote/.gitignore rename to examples/mdx-remote/.gitignore diff --git a/examples/with-mdx-remote/README.md b/examples/mdx-remote/README.md similarity index 91% rename from examples/with-mdx-remote/README.md rename to examples/mdx-remote/README.md index 974cea5b8114fb..176909b11df29a 100644 --- a/examples/with-mdx-remote/README.md +++ b/examples/mdx-remote/README.md @@ -10,22 +10,22 @@ Since `next-remote-watch` uses undocumented Next.js APIs, it doesn't replace the 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/clone?repository-url=https://github.com/vercel/next.js/tree/canary/examples/with-mdx-remote&project-name=with-mdx-remote&repository-name=with-mdx-remote) +[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vercel/next.js/tree/canary/examples/mdx-remote&project-name=mdx-remote&repository-name=mdx-remote) ## 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), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example: ```bash -npx create-next-app --example with-mdx-remote with-mdx-remote-app +npx create-next-app --example mdx-remote mdx-remote-app ``` ```bash -yarn create next-app --example with-mdx-remote with-mdx-remote-app +yarn create next-app --example mdx-remote mdx-remote-app ``` ```bash -pnpm create next-app --example with-mdx-remote with-mdx-remote-app +pnpm create next-app --example mdx-remote mdx-remote-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)). diff --git a/examples/with-mdx-remote/components/CustomLink.js b/examples/mdx-remote/components/CustomLink.js similarity index 100% rename from examples/with-mdx-remote/components/CustomLink.js rename to examples/mdx-remote/components/CustomLink.js diff --git a/examples/with-mdx-remote/components/Layout.js b/examples/mdx-remote/components/Layout.js similarity index 100% rename from examples/with-mdx-remote/components/Layout.js rename to examples/mdx-remote/components/Layout.js diff --git a/examples/with-mdx-remote/components/TestComponent.js b/examples/mdx-remote/components/TestComponent.js similarity index 100% rename from examples/with-mdx-remote/components/TestComponent.js rename to examples/mdx-remote/components/TestComponent.js diff --git a/examples/with-mdx-remote/package.json b/examples/mdx-remote/package.json similarity index 100% rename from examples/with-mdx-remote/package.json rename to examples/mdx-remote/package.json diff --git a/examples/with-mdx-remote/pages/index.js b/examples/mdx-remote/pages/index.js similarity index 100% rename from examples/with-mdx-remote/pages/index.js rename to examples/mdx-remote/pages/index.js diff --git a/examples/with-mdx-remote/pages/posts/[slug].js b/examples/mdx-remote/pages/posts/[slug].js similarity index 100% rename from examples/with-mdx-remote/pages/posts/[slug].js rename to examples/mdx-remote/pages/posts/[slug].js diff --git a/examples/with-mdx-remote/posts/example-post.mdx b/examples/mdx-remote/posts/example-post.mdx similarity index 100% rename from examples/with-mdx-remote/posts/example-post.mdx rename to examples/mdx-remote/posts/example-post.mdx diff --git a/examples/with-mdx-remote/posts/hello-world.mdx b/examples/mdx-remote/posts/hello-world.mdx similarity index 100% rename from examples/with-mdx-remote/posts/hello-world.mdx rename to examples/mdx-remote/posts/hello-world.mdx diff --git a/examples/with-mdx-remote/utils/mdxUtils.js b/examples/mdx-remote/utils/mdxUtils.js similarity index 100% rename from examples/with-mdx-remote/utils/mdxUtils.js rename to examples/mdx-remote/utils/mdxUtils.js diff --git a/examples/with-mdx/.gitignore b/examples/mdx/.gitignore similarity index 100% rename from examples/with-mdx/.gitignore rename to examples/mdx/.gitignore diff --git a/examples/app-dir-mdx/README.md b/examples/mdx/README.md similarity index 100% rename from examples/app-dir-mdx/README.md rename to examples/mdx/README.md diff --git a/examples/app-dir-mdx/app/blog/hello-world/page.mdx b/examples/mdx/app/blog/hello-world/page.mdx similarity index 100% rename from examples/app-dir-mdx/app/blog/hello-world/page.mdx rename to examples/mdx/app/blog/hello-world/page.mdx diff --git a/examples/app-dir-mdx/app/globals.css b/examples/mdx/app/globals.css similarity index 100% rename from examples/app-dir-mdx/app/globals.css rename to examples/mdx/app/globals.css diff --git a/examples/app-dir-mdx/app/layout.tsx b/examples/mdx/app/layout.tsx similarity index 100% rename from examples/app-dir-mdx/app/layout.tsx rename to examples/mdx/app/layout.tsx diff --git a/examples/app-dir-mdx/app/message.mdx b/examples/mdx/app/message.mdx similarity index 100% rename from examples/app-dir-mdx/app/message.mdx rename to examples/mdx/app/message.mdx diff --git a/examples/app-dir-mdx/app/page.module.css b/examples/mdx/app/page.module.css similarity index 100% rename from examples/app-dir-mdx/app/page.module.css rename to examples/mdx/app/page.module.css diff --git a/examples/app-dir-mdx/app/page.tsx b/examples/mdx/app/page.tsx similarity index 100% rename from examples/app-dir-mdx/app/page.tsx rename to examples/mdx/app/page.tsx diff --git a/examples/app-dir-mdx/mdx-components.tsx b/examples/mdx/mdx-components.tsx similarity index 100% rename from examples/app-dir-mdx/mdx-components.tsx rename to examples/mdx/mdx-components.tsx diff --git a/examples/mdx/next-env.d.ts b/examples/mdx/next-env.d.ts new file mode 100644 index 00000000000000..1b3be0840f3f6a --- /dev/null +++ b/examples/mdx/next-env.d.ts @@ -0,0 +1,5 @@ +/// +/// + +// NOTE: This file should not be edited +// see https://nextjs.org/docs/app/api-reference/config/typescript for more information. diff --git a/examples/app-dir-mdx/next.config.js b/examples/mdx/next.config.js similarity index 100% rename from examples/app-dir-mdx/next.config.js rename to examples/mdx/next.config.js diff --git a/examples/app-dir-mdx/package.json b/examples/mdx/package.json similarity index 100% rename from examples/app-dir-mdx/package.json rename to examples/mdx/package.json diff --git a/examples/app-dir-mdx/public/favicon.ico b/examples/mdx/public/favicon.ico similarity index 100% rename from examples/app-dir-mdx/public/favicon.ico rename to examples/mdx/public/favicon.ico diff --git a/examples/app-dir-mdx/public/next.svg b/examples/mdx/public/next.svg similarity index 100% rename from examples/app-dir-mdx/public/next.svg rename to examples/mdx/public/next.svg diff --git a/examples/app-dir-mdx/public/vercel.svg b/examples/mdx/public/vercel.svg similarity index 100% rename from examples/app-dir-mdx/public/vercel.svg rename to examples/mdx/public/vercel.svg diff --git a/examples/app-dir-mdx/tsconfig.json b/examples/mdx/tsconfig.json similarity index 100% rename from examples/app-dir-mdx/tsconfig.json rename to examples/mdx/tsconfig.json diff --git a/examples/app-dir-mdx/types/mdx.d.ts b/examples/mdx/types/mdx.d.ts similarity index 100% rename from examples/app-dir-mdx/types/mdx.d.ts rename to examples/mdx/types/mdx.d.ts diff --git a/scripts/run-for-change.js b/scripts/run-for-change.js index 4fa4bf1c6d7ef4..07f8d3fae07012 100644 --- a/scripts/run-for-change.js +++ b/scripts/run-for-change.js @@ -39,7 +39,7 @@ const CHANGE_ITEM_GROUPS = { 'packages/create-next-app', 'test/integration/create-next-app', 'examples/basic-css', - 'examples/with-mdx', + 'examples/mdx-pages', 'examples/with-sass', 'examples/with-eslint', ], diff --git a/test/e2e/yarn-pnp/test/with-mdx.test.ts b/test/e2e/yarn-pnp/test/mdx-pages.test.ts similarity index 73% rename from test/e2e/yarn-pnp/test/with-mdx.test.ts rename to test/e2e/yarn-pnp/test/mdx-pages.test.ts index 8c5ac75cc41deb..e9e4bb44491c37 100644 --- a/test/e2e/yarn-pnp/test/with-mdx.test.ts +++ b/test/e2e/yarn-pnp/test/mdx-pages.test.ts @@ -2,5 +2,5 @@ import { runTests } from './utils' // Skip in Turbopack as Yarn PnP is not supported. ;(process.env.TURBOPACK ? describe.skip : describe)('yarn PnP', () => { - runTests('with-mdx', '/', ['Look, a button', 'Hello']) + runTests('mdx-pages', '/', ['Look, a button', 'Hello']) }) diff --git a/test/examples/examples.test.ts b/test/examples/examples.test.ts index ffc9a5456d17d5..a1fc0a6529823c 100644 --- a/test/examples/examples.test.ts +++ b/test/examples/examples.test.ts @@ -10,7 +10,6 @@ const testedExamples = [ 'api-routes-middleware', 'api-routes-rate-limit', 'api-routes-rest', - 'app-dir-mdx', 'basic-css', 'basic-export', 'blog', @@ -28,6 +27,7 @@ const testedExamples = [ 'image-component', 'image-legacy-component', 'layout-component', + 'mdx', 'middleware', 'middleware-matcher', 'nested-components', @@ -51,10 +51,10 @@ const testedExamples = [ 'with-webassembly', // Library integrations that we can't break + 'mdx-pages', + 'mdx-remote', 'with-jest', 'with-jest-babel', - 'with-mdx', - 'with-mdx-remote', 'with-turbopack', ] diff --git a/test/turbopack-build-tests-manifest.json b/test/turbopack-build-tests-manifest.json index 757e53966aa5af..ebba09d2f7f621 100644 --- a/test/turbopack-build-tests-manifest.json +++ b/test/turbopack-build-tests-manifest.json @@ -6510,11 +6510,11 @@ "flakey": [], "runtimeError": false }, - "test/e2e/yarn-pnp/test/with-mdx.test.ts": { + "test/e2e/yarn-pnp/test/mdx-pages.test.ts": { "passed": [], "failed": [], "pending": [ - "yarn PnP should compile and serve the index page correctly with-mdx" + "yarn PnP should compile and serve the index page correctly mdx-pages" ], "flakey": [], "runtimeError": false diff --git a/test/turbopack-dev-examples-manifest.json b/test/turbopack-dev-examples-manifest.json index 026672ccdd652d..fafc765364747e 100644 --- a/test/turbopack-dev-examples-manifest.json +++ b/test/turbopack-dev-examples-manifest.json @@ -10,7 +10,6 @@ "api-routes-middleware": true, "api-routes-rate-limit": true, "api-routes-rest": true, - "app-dir-mdx": true, "auth": true, "auth-with-stytch": true, "auth0": true, @@ -58,6 +57,8 @@ "image-legacy-component": true, "inngest": true, "layout-component": true, + "mdx": true, + "mdx-remote": true, "middleware": true, "middleware-matcher": true, "nested-components": true, @@ -130,7 +131,6 @@ "with-magic": true, "with-mantine": true, "with-mdbreact": true, - "with-mdx-remote": true, "with-mobx": true, "with-mobx-state-tree": true, "with-mongodb": true, diff --git a/test/turbopack-dev-tests-manifest.json b/test/turbopack-dev-tests-manifest.json index b8fdca2413c2c6..6589cb857297fe 100644 --- a/test/turbopack-dev-tests-manifest.json +++ b/test/turbopack-dev-tests-manifest.json @@ -8852,11 +8852,11 @@ "flakey": [], "runtimeError": false }, - "test/e2e/yarn-pnp/test/with-mdx.test.ts": { + "test/e2e/yarn-pnp/test/mdx-pages.test.ts": { "passed": [], "failed": [], "pending": [ - "yarn PnP should compile and serve the index page correctly with-mdx" + "yarn PnP should compile and serve the index page correctly mdx-pages" ], "flakey": [], "runtimeError": false