-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
feat(v2): add before and after dev server implementation #4068
Conversation
❌ [V1] Deploy preview failure 🔨 Explore the source changes: 05c0567 🔍 Inspect the deploy logs: https://app.netlify.com/sites/docusaurus-1/deploys/60073c1080ce420007cebb25 |
❌ [V1] Deploy preview failure 🔨 Explore the source changes: bc41c8d 🔍 Inspect the deploy logs: https://app.netlify.com/sites/docusaurus-1/deploys/60073c8c6c074000082e4c13 |
Size Change: -4 B (0%) Total Size: 27.1 kB ℹ️ View Unchanged
|
✔️ Deploy preview for docusaurus-2 ready! 🔨 Explore the source changes: 05c0567 🔍 Inspect the deploy logs: https://app.netlify.com/sites/docusaurus-2/deploys/60073c10952b4b0008c73ea9 😎 Browse the preview: https://deploy-preview-4068--docusaurus-2.netlify.app |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-4068--docusaurus-2.netlify.app/classic/ |
✔️ Deploy preview for docusaurus-2 ready! 🔨 Explore the source changes: bc41c8d 🔍 Inspect the deploy logs: https://app.netlify.com/sites/docusaurus-2/deploys/60073c8ccd3e8800085c0fa5 😎 Browse the preview: https://deploy-preview-4068--docusaurus-2.netlify.app |
Thanks, Do you have a concrete use case in mind that gets solved by this new API? I don't have much context about this TODO in the code and why we need this 😅 maybe @yangshun knows why it can be useful? If we do need more customizations to the dev server, wouldn't it be preferable to let the user change whatever he wants from the default config we provide, instead of adding a new API for each devserver config. |
I believe this is for cases like where users want to add custom middleware, for example if they use the service worker plugin they may want to add react-dev-utils's |
What if we had a "configureWebpackDevServer" instead? That would also allow that usecase and yet be a more future-proof API? |
Going to close this until there is an exact feature request for it. |
beforeDevServer
&afterDevServer
have been removedconfigureDevServer
has been addedMotivation
It was on the todo list.
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
It works just fine in my testing.
Related PRs
n/a