@cloudflare/vite-plugin 1.2.4 → 1.3.0

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.
Files changed (2) hide show
  1. package/dist/index.js +8 -12
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -13346,9 +13346,9 @@ import colors2 from "picocolors";
13346
13346
  import { globSync } from "tinyglobby";
13347
13347
  import "vite";
13348
13348
  import { unstable_getMiniflareWorkerOptions } from "wrangler";
13349
- function getPersistence(root, persistState) {
13349
+ function getPersistenceRoot(root, persistState) {
13350
13350
  if (persistState === false) {
13351
- return {};
13351
+ return;
13352
13352
  }
13353
13353
  const defaultPersistPath = ".wrangler/state";
13354
13354
  const persistPath = path6.resolve(
@@ -13356,14 +13356,7 @@ function getPersistence(root, persistState) {
13356
13356
  typeof persistState === "object" ? persistState.path : defaultPersistPath,
13357
13357
  "v3"
13358
13358
  );
13359
- return {
13360
- cachePersist: path6.join(persistPath, "cache"),
13361
- d1Persist: path6.join(persistPath, "d1"),
13362
- durableObjectsPersist: path6.join(persistPath, "do"),
13363
- kvPersist: path6.join(persistPath, "kv"),
13364
- r2Persist: path6.join(persistPath, "r2"),
13365
- workflowsPersist: path6.join(persistPath, "workflows")
13366
- };
13359
+ return persistPath;
13367
13360
  }
13368
13361
  function missingWorkerErrorMessage(workerName) {
13369
13362
  return `${workerName} does not match a worker name.`;
@@ -13613,7 +13606,7 @@ function getDevMiniflareOptions(resolvedPluginConfig, viteDevServer, inspectorPo
13613
13606
  (error) => logger.logWithLevel(LogLevel.ERROR, decoder.decode(error))
13614
13607
  );
13615
13608
  },
13616
- ...getPersistence(
13609
+ defaultPersistRoot: getPersistenceRoot(
13617
13610
  resolvedViteConfig.root,
13618
13611
  resolvedPluginConfig.persistState
13619
13612
  ),
@@ -13780,7 +13773,10 @@ function getPreviewMiniflareOptions(vitePreviewServer, workerConfigs, persistSta
13780
13773
  (error) => logger.logWithLevel(LogLevel.ERROR, decoder.decode(error))
13781
13774
  );
13782
13775
  },
13783
- ...getPersistence(resolvedViteConfig.root, persistState),
13776
+ defaultPersistRoot: getPersistenceRoot(
13777
+ resolvedViteConfig.root,
13778
+ persistState
13779
+ ),
13784
13780
  workers
13785
13781
  };
13786
13782
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudflare/vite-plugin",
3
- "version": "1.2.4",
3
+ "version": "1.3.0",
4
4
  "description": "Cloudflare plugin for Vite",
5
5
  "keywords": [
6
6
  "cloudflare",
@@ -41,11 +41,11 @@
41
41
  "tinyglobby": "^0.2.12",
42
42
  "unenv": "2.0.0-rc.17",
43
43
  "ws": "8.18.0",
44
- "miniflare": "4.20250508.3",
45
- "wrangler": "4.16.1"
44
+ "miniflare": "4.20250523.0",
45
+ "wrangler": "4.17.0"
46
46
  },
47
47
  "devDependencies": {
48
- "@cloudflare/workers-types": "^4.20250508.0",
48
+ "@cloudflare/workers-types": "^4.20250523.0",
49
49
  "@types/node": "^22.10.1",
50
50
  "@types/ws": "^8.5.13",
51
51
  "magic-string": "^0.30.12",