-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
Better SSR support [watch build] #972
Comments
Watch support for |
I can submit a pull request to implement this feature. |
Similar to.. @surmon-china
|
@surmon-china any updates on the PR? I've taken a look at Vite source and I agree this would be a pretty simple change. Basically, Rollup should just run I would do the PR myself but I can't figure out exactly how I'm supposed to run the playground, testing, and dev server to create an acceptable result... For someone experienced with the codebase, any thoughts? |
|
Any update on this feature? |
Feature
I am using vite to build an SSR website, during which I tried to implement a nuxt-like, faster SSR framework, but I need better support.
I wish
build
andssrBuild
can supportwatch
mode, or there bewatchBuild
andwatchSSRBuild
functionsSSR inevitably requires real-time compilation of products (Client & Server)
In my test.
First, a form of
fileWatcher(files, () => build().then(() => restart()))
is used to track file changes and execute compile, but this will do a fullbuild
without cache support, which takes a long time.Second. If you use
rollup.watch
to compile, you can quickly update the product and achieve a better development experience.However, the implementation of the
build
function in the vitesrc/node/build/index.ts:build
file is too complex and deeply coupled, and I have to re-implement it externally, so I hope this can be extracted as a single function.links
rollup.watch & write
roolup watch.skipWrite option
The text was updated successfully, but these errors were encountered: