-
-
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
[docs] Fix Next.js hosting on mui.com #661
Conversation
Your Render PR Server URL is https://toolpad-pr-661.onrender.com. Follow its progress at https://dashboard.render.com/web/srv-cb8nk8rvog4l97ebo3b0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this doesn't seem to work, the assets are still hosted under the conflicting folder:
https://deploy-preview-661--mui-toolpad-docs.netlify.app/_next/static/chunks/871-bbf549ab618193c5.js. We have only customized the build folder location, not the URLs.
docs/next.config.js
Outdated
@@ -141,6 +141,7 @@ module.exports = withTM({ | |||
return map; | |||
}, | |||
reactStrictMode, | |||
distDir: 'dist', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on the nature of the problem that we are trying to solve: scoping. I think that we should bring more context. Maybe something like this:
distDir: 'dist', | |
distDir: '_next/toolpad', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the basePath
option is meant for exactly this purpose, scoping.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the basePath option is meant for exactly this purpose, scoping.
I had a quick look at this in vercel/next.js#31718 (comment)
I suspect that we need
It's not awesome because it would mean that the previews in the production deploy would be broken https://app.netlify.com/sites/mui-toolpad-docs/overview. I couldn't find anything better to make it work in production. I have commented in #660 what I have explored. |
Your Render PR Server URL is https://toolpad-pr-661.onrender.com. Follow its progress at https://dashboard.render.com/web/srv-cbcjpasgqg4c3s69a2dg. |
Using the |
@bharatkashyap Ah smart. 👍 from my side, we avoid the limitation of point 3 in #660. I think that we have two steps left:
|
Yes, have done that
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
Co-authored-by: Olivier Tassinari <[email protected]>
Co-authored-by: Olivier Tassinari <[email protected]>
See #660
https://deploy-preview-661--mui-toolpad-docs.netlify.app/toolpad/