[docs-infra] Extract shared App component from _app into @mui/docs by brijeshb42 · Pull Request #47933 · mui/material-ui (original) (raw)

@brijeshb42

Create a configurable component in @mui/docs/DocsApp that encapsulates the common provider tree and boilerplate previously duplicated between material-ui and mui-x _app files.

New module: packages/mui-docs/src/DocsApp/

Moved into DocsApp/ (only used by DocsApp, no external consumers):

Converted _app.js → _app.tsx and _document.js → _document.tsx in both material-ui and mui-x docs, adding proper TypeScript annotations.

Type fixes in PageContext:

Added docs/types/webpack.d.ts declaring require.context() on NodeJS.Require to support the TypeScript conversion.