next.js
93323704 - examples: update `with-mdx-remote` example to utilize the App Router (#74067)

Commit
1 year ago
examples: update `with-mdx-remote` example to utilize the App Router (#74067) ## Description This PR updates the [`with-mdx-remote`](https://github.com/vercel/next.js/tree/canary/examples/with-mdx-remote) example to use the App Router and TypeScript. Here are the changes that have been made: 1. Renamed the `pages` folder to the `app` folder. 2. Converted JavaScript to TypeScript files and created `tsconfig.json`. 3. Created a new `global.css` and `layout.tsx` files in the app directory. 4. Used [CSS module](https://github.com/css-modules/css-modules) instead of [styled-jsx](https://github.com/vercel/styled-jsx). 5. Removed [`next-remote-watch`](https://github.com/hashicorp/next-remote-watch) due to incompatibility and no maintenance. 6. Removed [`gray-matter`](https://github.com/jonschlinkert/gray-matter) and implement front-matter parser as well. 7. Updated the `.gitignore`, `package.json` and README.md files. The new app looks and works much the same as the old one. ### Adding or Updating Examples - [x] The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - [x] Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md --------- Co-authored-by: Sam Ko <sam@vercel.com>
Parents
Loading