@cloudflare/vite-plugin 0.0.0-9adbd50cf → 0.0.0-9b86dba81

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.
@@ -6,12 +6,21 @@ import {
6
6
  } from "cloudflare:workers";
7
7
 
8
8
  // src/constants.ts
9
- var MODULE_TYPES = ["CompiledWasm"];
9
+ var ADDITIONAL_MODULE_TYPES = [
10
+ "CompiledWasm",
11
+ "Data",
12
+ "Text"
13
+ ];
10
14
 
11
15
  // src/shared.ts
12
16
  var UNKNOWN_HOST = "http://localhost";
13
17
  var INIT_PATH = "/__vite_plugin_cloudflare_init__";
14
- var MODULE_PATTERN = `__CLOUDFLARE_MODULE__(${MODULE_TYPES.join("|")})__(.*?)__`;
18
+ var ADDITIONAL_MODULE_PATTERN = `__CLOUDFLARE_MODULE__(${ADDITIONAL_MODULE_TYPES.join("|")})__(.*?)__`;
19
+ var additionalModuleRE = new RegExp(ADDITIONAL_MODULE_PATTERN);
20
+ var additionalModuleGlobalRE = new RegExp(
21
+ ADDITIONAL_MODULE_PATTERN,
22
+ "g"
23
+ );
15
24
  var VITE_DEV_METADATA_HEADER = "__VITE_DEV_METADATA__";
16
25
 
17
26
  // src/runner-worker/env.ts
@@ -1408,8 +1417,7 @@ async function createModuleRunner(env, webSocket, viteRoot) {
1408
1417
  }
1409
1418
  },
1410
1419
  async runExternalModule(filepath) {
1411
- const moduleRE = new RegExp(MODULE_PATTERN);
1412
- if (!moduleRE.test(filepath) && filepath.includes("/node_modules") && !filepath.includes("/node_modules/.vite")) {
1420
+ if (!additionalModuleRE.test(filepath) && filepath.includes("/node_modules") && !filepath.includes("/node_modules/.vite")) {
1413
1421
  throw new Error(
1414
1422
  `[Error] Trying to import non-prebundled module (only prebundled modules are allowed): ${filepath}
1415
1423
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudflare/vite-plugin",
3
- "version": "0.0.0-9adbd50cf",
3
+ "version": "0.0.0-9b86dba81",
4
4
  "description": "Cloudflare plugin for Vite",
5
5
  "keywords": [
6
6
  "cloudflare",
@@ -33,16 +33,16 @@
33
33
  "dist"
34
34
  ],
35
35
  "dependencies": {
36
- "@cloudflare/unenv-preset": "1.1.1",
37
36
  "@hattip/adapter-node": "^0.0.49",
38
37
  "tinyglobby": "^0.2.12",
39
- "unenv": "2.0.0-rc.1",
38
+ "unenv": "2.0.0-rc.15",
40
39
  "ws": "8.18.0",
41
- "miniflare": "0.0.0-9adbd50cf",
42
- "wrangler": "0.0.0-9adbd50cf"
40
+ "@cloudflare/unenv-preset": "0.0.0-9b86dba81",
41
+ "miniflare": "0.0.0-9b86dba81",
42
+ "wrangler": "0.0.0-9b86dba81"
43
43
  },
44
44
  "devDependencies": {
45
- "@cloudflare/workers-types": "^4.20250317.0",
45
+ "@cloudflare/workers-types": "^4.20250319.0",
46
46
  "@types/node": "^22.10.1",
47
47
  "@types/ws": "^8.5.13",
48
48
  "magic-string": "^0.30.12",
@@ -51,10 +51,10 @@
51
51
  "typescript": "^5.7.2",
52
52
  "undici": "^5.28.5",
53
53
  "vite": "^6.1.0",
54
- "vitest": "~3.0.5",
54
+ "vitest": "~3.0.8",
55
55
  "@cloudflare/mock-npm-registry": "0.0.0",
56
- "@cloudflare/workers-tsconfig": "0.0.0",
57
- "@cloudflare/workers-shared": "0.0.0-9adbd50cf"
56
+ "@cloudflare/workers-shared": "0.0.0-9b86dba81",
57
+ "@cloudflare/workers-tsconfig": "0.0.0"
58
58
  },
59
59
  "peerDependencies": {
60
60
  "vite": "^6.1.0",