@cloudflare/vite-plugin 0.0.0-1b07419b5 → 0.0.0-1bc60d761
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/asset-workers/asset-worker.js +745 -661
- package/dist/asset-workers/router-worker.js +639 -563
- package/dist/index.js +17 -10
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1236,6 +1236,7 @@ function createCloudflareEnvironmentOptions(workerConfig, userConfig, environmen
|
|
|
1236
1236
|
optimizeDeps: {
|
|
1237
1237
|
// Note: ssr pre-bundling is opt-in and we need to enable it by setting `noDiscovery` to false
|
|
1238
1238
|
noDiscovery: false,
|
|
1239
|
+
entries: workerConfig.main,
|
|
1239
1240
|
exclude: [
|
|
1240
1241
|
...cloudflareBuiltInModules,
|
|
1241
1242
|
// we have to exclude all node modules to work in dev-mode not just the unenv externals...
|
|
@@ -2404,11 +2405,14 @@ function cloudflare2(pluginConfig = {}) {
|
|
|
2404
2405
|
resolvedPluginConfig,
|
|
2405
2406
|
miniflare
|
|
2406
2407
|
);
|
|
2407
|
-
const middleware = createMiddleware(
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2408
|
+
const middleware = createMiddleware(
|
|
2409
|
+
({ request }) => {
|
|
2410
|
+
return entryWorker.fetch(toMiniflareRequest(request), {
|
|
2411
|
+
redirect: "manual"
|
|
2412
|
+
});
|
|
2413
|
+
},
|
|
2414
|
+
{ alwaysCallNext: false }
|
|
2415
|
+
);
|
|
2412
2416
|
handleWebSocket(
|
|
2413
2417
|
viteDevServer.httpServer,
|
|
2414
2418
|
entryWorker.fetch,
|
|
@@ -2427,11 +2431,14 @@ function cloudflare2(pluginConfig = {}) {
|
|
|
2427
2431
|
pluginConfig.persistState ?? true
|
|
2428
2432
|
)
|
|
2429
2433
|
);
|
|
2430
|
-
const middleware = createMiddleware(
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2434
|
+
const middleware = createMiddleware(
|
|
2435
|
+
({ request }) => {
|
|
2436
|
+
return miniflare2.dispatchFetch(toMiniflareRequest(request), {
|
|
2437
|
+
redirect: "manual"
|
|
2438
|
+
});
|
|
2439
|
+
},
|
|
2440
|
+
{ alwaysCallNext: false }
|
|
2441
|
+
);
|
|
2435
2442
|
handleWebSocket(
|
|
2436
2443
|
vitePreviewServer.httpServer,
|
|
2437
2444
|
miniflare2.dispatchFetch,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudflare/vite-plugin",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-1bc60d761",
|
|
4
4
|
"description": "Cloudflare plugin for Vite",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@hattip/adapter-node": "^0.0.49",
|
|
38
38
|
"unenv": "2.0.0-rc.1",
|
|
39
39
|
"ws": "^8.18.0",
|
|
40
|
-
"miniflare": "0.0.0-
|
|
40
|
+
"miniflare": "0.0.0-1bc60d761"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@cloudflare/workers-types": "^4.20250204.0",
|
|
@@ -47,9 +47,9 @@
|
|
|
47
47
|
"tsup": "8.3.0",
|
|
48
48
|
"typescript": "^5.7.2",
|
|
49
49
|
"vite": "^6.1.0",
|
|
50
|
-
"@cloudflare/workers-shared": "0.0.0-
|
|
50
|
+
"@cloudflare/workers-shared": "0.0.0-1bc60d761",
|
|
51
51
|
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
52
|
-
"wrangler": "0.0.0-
|
|
52
|
+
"wrangler": "0.0.0-1bc60d761"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"vite": "^6.1.0",
|