feat: restart server with overwritten configuration#8766
feat: restart server with overwritten configuration#8766CHOYSEN wants to merge 1 commit intovitejs:mainfrom
Conversation
✅ Deploy Preview for vite-docs-main ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
|
Is there an example of a usecase for restarting with a different |
|
Vitepress allow user write their config, and then listening the config change. Though i can write the following code to modify server.config.inlineConfig.base = newData.base
await server.restart() |
|
Shouldn't restarting the server would re-run all plugins which can then set the new While I think we're working around this when it can be as simple as the proposed solution in the PR, I think it would be better in the long run when more plugins call |
|
Thanks for your reply, i agree with you that plugin should use the |
I think we could leave it in for awhile if someone is actually using it. The other way of handling things may not be as straightforward for them, but until we have something like |
Description
Provide a programming way to modify configuration like
base/port.Additional context
HAS BREAKING CHANGE!
Remove the
forceOptimizearg, so user need manually pass{ server: { force: true } }to keep the previous behaviorWhat is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123).