-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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] Improve infrastructure #20751
[docs] Improve infrastructure #20751
Conversation
d76dd1c
to
f742566
Compare
f742566
to
f5c9e03
Compare
Details of bundle changes.Comparing: 79085fc...faf2471 Details of page changes
|
let demos = demosProp; | ||
let docs = docsProp; | ||
|
||
if (process.env.NODE_ENV !== 'production' && pageFilename && requireRaw) { |
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 should not be in. Not having hot-reload for getInitialProps is a nextjs issue not Material-UI issue. This is creates fudamentally different dev and prod environments for little gain.
Live markdown is available directly in vscode and I'd be surprised if other IDEs don't have an extension for markdown as well.
This sets a dangerous precedent for monkey-patching hot-releoading for every getInitialProps, getStatisProps, getStaticPaths etc.
Eventually this won't work anyway once we move from getInitialProps to getStaticProps which might result in node-only code.
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.
Ok, let's do it incrementally. I'm removing the change. Let's see how the DX is in the coming days. I guess it's a matter of habit. I always end-up testing how it looks like for the users. Is the text too long, Is the layout correct, etc?
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.
@timneutkens Has the Next.js team considered to support live reload on getInitialProps
/getStatisProps
? Related to https://twitter.com/timneutkens/status/1251942933953228802.
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.
@timneutkens Has the Next.js team considered to support live reload on
getInitialProps
/getStatisProps
? Related to twitter.com/timneutkens/status/1251942933953228802.
Yes! Won't be part of the fast refresh work but definitely something we want to tackle.
a343689
to
faf2471
Compare
Follow-up on the comment #20601 (comment) by @Andrew5569
Solves:
Restore support for live markdown updates in dev mode without a negative impact in prod.I haven't looked into reducing the included languages in the index.html (from #20652). Maybe later, I don't want to make the pull request too overloaded. @eps1lon If you feel otherwise, if you would rather have 1 PR to review or 6, I will make the required changes.