docs: local development: Rewrite docker section, add Windows Dev Drive and WSL2 instructions - #98164
Conversation
…e and WSL2 instructions
Tests PassedCommit: 3272f40 |
|
|
||
| ## Improving application development performance | ||
|
|
||
| ### 1. Update Next.js and use Turbopack |
There was a problem hiding this comment.
are the numbers important ? can we get auto numbering working/
There was a problem hiding this comment.
It's just sorta an order of priority? IDK, I was mostly preserving it from the other section.
This isn't an actual <ol> element, so markdown's auto-numbering doesn't apply here.
There was a problem hiding this comment.
maybe there is an mdx'ism for this? no big deal ofc
There was a problem hiding this comment.
Yeah, I don't think there is.
There was a problem hiding this comment.
dev drive is a better solution here, so mention... link below?
| - Reserve Docker for production deployments and testing production builds. | ||
| - If you must use Docker for development, consider running Docker natively on a Linux machine or a manually configured virtual machine. If using a manually configured virtual machine, move the source code into the VM and do not share it from the host. | ||
| - If you're using Docker Desktop, evaluate using [synchronized file shares](https://docs.docker.com/desktop/features/synchronized-file-sharing/). Synchronized file shares still add latency compared to running Next.js directly on the host, but can improve file-watching reliability without resorting to polling. | ||
| - Avoid using `watchOptions.pollIntervalMs` in `next.config.js` to work around Fast Refresh issues. Only use it as a last resort. Polling adds significant latency and can drastically increase CPU and I/O usage. |
There was a problem hiding this comment.
Should this PR be merged, https://github.com/vercel/next.js/pull/80687/changes and x-references here? I understand we kind of want to discourage usage though — not all of the config options need a reference, specially if its there to serve what feels like an edge case in dev environments
There was a problem hiding this comment.
I think we can have the documentation if we are very clear on that documentation page why people should never use it. We've fixed most of the compatibility issues with Turbopack for that feature.
The only outstanding issue I know of is caused by notify-rs/notify#981, but we're waiting on a new release of notify-rs.
Follow-up to https://vercel.slack.com/archives/C046HAU4H7F/p1787344658655399
Summary:
watchOptions.pollIntervalMsas a workaround.