This PR adds state persistence. By default, state is persisted to .wrangler/state/v3 in the same directory as the Vite config. This matches the default behaviour of Wrangler. A new persistTo option has also been added to the plugin config. If a string is provided then this is used as the persistence directory. If false is provided then state is not persisted between runs of the dev server.
I have set persistTo to false in the integration tests.
resolves #21
This PR adds state persistence. By default, state is persisted to
.wrangler/state/v3
in the same directory as the Vite config. This matches the default behaviour of Wrangler. A newpersistTo
option has also been added to the plugin config. If a string is provided then this is used as the persistence directory. Iffalse
is provided then state is not persisted between runs of the dev server.I have set
persistTo
tofalse
in the integration tests.