-
-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[code-infra] Use @mui/docs from npm #3301
Conversation
Still needs publishing |
This change broke all the links, they are missing their trailing slashes. It's critical we have a solution for this. Bug open #3401. Before https://deploy-preview-3301--mui-toolpad-docs.netlify.app/toolpad/ As far as I can debug it, it's an issue with https://github.com/vercel/next.js/blob/33e8334d35cb353c37b5d21fb4ca9d860d2e3f6a/packages/next/src/client/normalize-trailing-slash.ts#L14. As before: diff --git a/docs/next.config.mjs b/docs/next.config.mjs
index 820a1d63..c3442b91 100644
--- a/docs/next.config.mjs
+++ b/docs/next.config.mjs
@@ -14,13 +14,16 @@ const { findPages } = require('./src/modules/utils/find');
const WORKSPACE_ROOT = path.resolve(currentDirectory, '../');
const MONOREPO_PATH = path.resolve(currentDirectory, '../node_modules/@mui/monorepo');
+const MONOREPO_PACKAGES = {
+ '@mui/docs': path.resolve(MONOREPO_PATH, './packages/mui-docs/src'),
+};
@@ -40,6 +43,7 @@ export default withDocsInfra({
alias: {
...config.resolve.alias,
docs: path.resolve(MONOREPO_PATH, './docs'),
+ ...MONOREPO_PACKAGES,
'@toolpad/studio-components': path.resolve(
currentDirectory,
'../packages/toolpad-studio-components/src', Transpile it: diff --git a/docs/next.config.mjs b/docs/next.config.mjs
index 820a1d63..c3442b91 100644
--- a/docs/next.config.mjs
+++ b/docs/next.config.mjs
@@ -14,13 +14,16 @@ const { findPages } = require('./src/modules/utils/find');
export default withDocsInfra({
experimental: {
workerThreads: true,
cpus: 3,
},
- transpilePackages: ['@mui/monorepo', '@mui/x-charts'],
+ transpilePackages: ['@mui/monorepo', '@mui/x-charts', '@mui/docs'],
// Avoid conflicts with the other Next.js apps hosted under https://mui.com/
assetPrefix: process.env.DEPLOY_ENV === 'development' ? undefined : '/toolpad',
env: { |
oh wow, ok. Let's transpile it then. |
To be updated once mui/material-ui#41206 is merged and published.