@cloudflare/vite-plugin 1.15.0 → 1.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +4 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/dist/index.mjs
CHANGED
|
@@ -16056,6 +16056,10 @@ process.on("exit", () => {
|
|
|
16056
16056
|
const previewPlugin = createPlugin("preview", (ctx) => {
|
|
16057
16057
|
return { async configurePreviewServer(vitePreviewServer) {
|
|
16058
16058
|
assertIsPreview(ctx);
|
|
16059
|
+
const closePreviewServer = vitePreviewServer.close.bind(vitePreviewServer);
|
|
16060
|
+
vitePreviewServer.close = async () => {
|
|
16061
|
+
await Promise.all([ctx.disposeMiniflare(), closePreviewServer()]);
|
|
16062
|
+
};
|
|
16059
16063
|
const { miniflareOptions, containerTagToOptionsMap } = await getPreviewMiniflareOptions(ctx, vitePreviewServer);
|
|
16060
16064
|
await ctx.startOrUpdateMiniflare(miniflareOptions);
|
|
16061
16065
|
if (containerTagToOptionsMap.size) {
|