Migrate docs site to App Router on Next canary#8338
Migrate docs site to App Router on Next canary#8338feedthejim wants to merge 10 commits intoreactjs:mainfrom
Conversation
Size changesDetails📦 Next.js Bundle Analysis for react-devThis analysis was generated by the Next.js Bundle Analysis action. 🤖 🎉 Global Bundle Size Decreased
DetailsThe global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster. Any third party scripts you have added directly to your app using the If you want further insight into what is behind the changes, give @next/bundle-analyzer a try! |
| useEffect(() => { | ||
| const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); | ||
| if (isSafari) { | ||
| history.scrollRestoration = 'auto'; |
There was a problem hiding this comment.
is this hack still needed and does it still work?
iirc this was to make Back gesture show previous content
| }) | ||
| ); | ||
|
|
||
| const cachedResult = await readFromCache(store, hash); |
There was a problem hiding this comment.
do we need this caching stuff now? feels like it's just reimplementing with 'use cache' gives us
|
Thank you for doing this upgrade! I am also seeing a lot more JS being loaded, 2.9mb on local vs 1.9mb on prod, while both versions use about 980kb of JS. This suggests we have some tree-shaking/bundling issues. With Turbopack, I am not sure how to fix it because the magic comments do not appear to be supported yet. |


Summary
next@canary, enable Cache Components, and rely on Turbopack as the default build pathWhat changed
llms.txt,rss.xml, markdown API,404,500,not-found, anderroruse cachepage-data helpers, cache tagging, and dev invalidation wiring for markdown/sidebar editscompileMDX/prepareMDXpath with a server-firstgenerateMDXpipeline and dedicated MDX plugins for TOC extraction, code metadata, max-width wrapping, and stabledata-mdx-nameannotationsnext/navigation/useLinkStatus, plus explicit client islands for TOC, language list, challenges, examples, terminal copy UI, analytics, and error decoder behaviorSandpack / tooling notes
raw-loadereslint-linter-browserifyand use a browser-safe alias foreslint-plugin-react-hooksrouter.refresh()under TurbopackValidation
yarn buildyarn lint(passes; existingno-img-elementwarnings remain)yarn deadlinksyarn test:eslint-local-rules