vite: Vue: `forceViteRestart` function does not always work.
forceViteRestart
uses a fixed delay to restart vite, but this does not always work.
Sometimes I need to rerun npm run dev
several times.
Can it be integrated into the plugin automatically reload like vite-plugin-restart
?
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 16 (11 by maintainers)
At the same time, because the build expose uses esbuild, Vite does not observe
federation.config.js
file changes.So I had to manually restart vite each time I changed the configuration file.
With this plugin, it can reboot automatically.
Although this scenario is rare, it is usually only needed.
Yes, I’ve used it in a real project and it’s working well so far.
In fact, I don’t think this plugin has anything to do with Vue or react. It’s more of a
@module-federation/Vite
add-on.Since
@module-federation/Vite
changes the configuration, we need to restart the Vite server.This is not a problem that only occurs on Vue.