@cloudflare/vite-plugin 0.0.0-57ddaacde → 0.0.0-5889c4c71

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.
@@ -2487,13 +2487,6 @@ var CustomAssetWorker = class extends fr {
2487
2487
  const exists = await response.json();
2488
2488
  return exists ? pathname : null;
2489
2489
  }
2490
- async unstable_canFetch(request) {
2491
- const secFetchMode = request.headers.get("X-Mf-Sec-Fetch-Mode");
2492
- if (secFetchMode) {
2493
- request.headers.set("Sec-Fetch-Mode", secFetchMode);
2494
- }
2495
- return await super.unstable_canFetch(request);
2496
- }
2497
2490
  };
2498
2491
  export {
2499
2492
  CustomAssetWorker as default
package/dist/index.d.ts CHANGED
@@ -29,4 +29,4 @@ interface PluginConfig extends EntryWorkerConfig {
29
29
  */
30
30
  declare function cloudflare(pluginConfig?: PluginConfig): vite.Plugin[];
31
31
 
32
- export { type PluginConfig, cloudflare };
32
+ export { cloudflare };
package/dist/index.js CHANGED
@@ -8155,10 +8155,6 @@ function getRouterWorker(miniflare) {
8155
8155
  return miniflare.getWorker(ROUTER_WORKER_NAME);
8156
8156
  }
8157
8157
  function toMiniflareRequest(request) {
8158
- const secFetchMode = request.headers.get("Sec-Fetch-Mode");
8159
- if (secFetchMode) {
8160
- request.headers.set("X-Mf-Sec-Fetch-Mode", secFetchMode);
8161
- }
8162
8158
  return new MiniflareRequest(request.url, {
8163
8159
  method: request.method,
8164
8160
  headers: [["accept-encoding", "identity"], ...request.headers],
@@ -8599,13 +8595,6 @@ function getDevMiniflareOptions(resolvedPluginConfig, viteDevServer) {
8599
8595
  const resolvedViteConfig = viteDevServer.config;
8600
8596
  const entryWorkerConfig = getEntryWorkerConfig(resolvedPluginConfig);
8601
8597
  const assetsConfig = resolvedPluginConfig.type === "assets-only" ? resolvedPluginConfig.config.assets : entryWorkerConfig?.assets;
8602
- const compatibilityOptions = resolvedPluginConfig.type === "assets-only" ? {
8603
- compatibility_date: resolvedPluginConfig.config.compatibility_date,
8604
- compatibility_flags: resolvedPluginConfig.config.compatibility_flags
8605
- } : {
8606
- ...entryWorkerConfig?.compatibility_date ? { compatibility_date: entryWorkerConfig?.compatibility_date } : {},
8607
- ...entryWorkerConfig?.compatibility_flags ? { compatibility_flags: entryWorkerConfig?.compatibility_flags } : {}
8608
- };
8609
8598
  const assetWorkers = [
8610
8599
  {
8611
8600
  name: ROUTER_WORKER_NAME,
@@ -8645,7 +8634,6 @@ function getDevMiniflareOptions(resolvedPluginConfig, viteDevServer) {
8645
8634
  ],
8646
8635
  bindings: {
8647
8636
  CONFIG: {
8648
- ...compatibilityOptions,
8649
8637
  ...assetsConfig?.html_handling ? { html_handling: assetsConfig.html_handling } : {},
8650
8638
  ...assetsConfig?.not_found_handling ? { not_found_handling: assetsConfig.not_found_handling } : {}
8651
8639
  }
@@ -1417,15 +1417,6 @@ async function createModuleRunner(env, webSocket, viteRoot) {
1417
1417
  }
1418
1418
  },
1419
1419
  async runExternalModule(filepath) {
1420
- if (filepath === "cloudflare:workers") {
1421
- const originalCloudflareWorkersModule = await import("cloudflare:workers");
1422
- return Object.seal({
1423
- ...originalCloudflareWorkersModule,
1424
- env: stripInternalEnv(
1425
- originalCloudflareWorkersModule.env
1426
- )
1427
- });
1428
- }
1429
1420
  if (!additionalModuleRE.test(filepath) && filepath.includes("/node_modules") && !filepath.includes("/node_modules/.vite")) {
1430
1421
  throw new Error(
1431
1422
  `[Error] Trying to import non-prebundled module (only prebundled modules are allowed): ${filepath}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudflare/vite-plugin",
3
- "version": "0.0.0-57ddaacde",
3
+ "version": "0.0.0-5889c4c71",
4
4
  "description": "Cloudflare plugin for Vite",
5
5
  "keywords": [
6
6
  "cloudflare",
@@ -38,12 +38,12 @@
38
38
  "tinyglobby": "^0.2.12",
39
39
  "unenv": "2.0.0-rc.15",
40
40
  "ws": "8.18.0",
41
- "@cloudflare/unenv-preset": "0.0.0-57ddaacde",
42
- "miniflare": "0.0.0-57ddaacde",
43
- "wrangler": "0.0.0-57ddaacde"
41
+ "@cloudflare/unenv-preset": "0.0.0-5889c4c71",
42
+ "wrangler": "0.0.0-5889c4c71",
43
+ "miniflare": "0.0.0-5889c4c71"
44
44
  },
45
45
  "devDependencies": {
46
- "@cloudflare/workers-types": "^4.20250320.0",
46
+ "@cloudflare/workers-types": "^4.20250319.0",
47
47
  "@types/node": "^22.10.1",
48
48
  "@types/ws": "^8.5.13",
49
49
  "magic-string": "^0.30.12",
@@ -54,7 +54,7 @@
54
54
  "vite": "^6.1.0",
55
55
  "vitest": "~3.0.8",
56
56
  "@cloudflare/mock-npm-registry": "0.0.0",
57
- "@cloudflare/workers-shared": "0.0.0-57ddaacde",
57
+ "@cloudflare/workers-shared": "0.0.0-5889c4c71",
58
58
  "@cloudflare/workers-tsconfig": "0.0.0"
59
59
  },
60
60
  "peerDependencies": {