@cloudflare/vite-plugin 0.1.14 → 0.1.16

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.
@@ -1417,6 +1417,15 @@ 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
+ }
1420
1429
  if (!additionalModuleRE.test(filepath) && filepath.includes("/node_modules") && !filepath.includes("/node_modules/.vite")) {
1421
1430
  throw new Error(
1422
1431
  `[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.1.14",
3
+ "version": "0.1.16",
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": "2.3.0",
42
- "miniflare": "4.20250319.0",
43
- "wrangler": "4.3.0"
41
+ "@cloudflare/unenv-preset": "2.3.1",
42
+ "miniflare": "4.20250321.0",
43
+ "wrangler": "4.4.1"
44
44
  },
45
45
  "devDependencies": {
46
- "@cloudflare/workers-types": "^4.20250319.0",
46
+ "@cloudflare/workers-types": "^4.20250321.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.17.0",
57
+ "@cloudflare/workers-shared": "0.17.1",
58
58
  "@cloudflare/workers-tsconfig": "0.0.0"
59
59
  },
60
60
  "peerDependencies": {