@cloudflare/vite-plugin 0.1.6 → 0.1.7
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/index.js +12 -8
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1364,7 +1364,12 @@ import * as fs2 from "node:fs";
|
|
|
1364
1364
|
import * as fsp from "node:fs/promises";
|
|
1365
1365
|
import * as path3 from "node:path";
|
|
1366
1366
|
import { fileURLToPath } from "node:url";
|
|
1367
|
-
import {
|
|
1367
|
+
import {
|
|
1368
|
+
kCurrentWorker,
|
|
1369
|
+
Log,
|
|
1370
|
+
LogLevel,
|
|
1371
|
+
Response as MiniflareResponse
|
|
1372
|
+
} from "miniflare";
|
|
1368
1373
|
import "vite";
|
|
1369
1374
|
import {
|
|
1370
1375
|
unstable_getMiniflareWorkerOptions,
|
|
@@ -1398,11 +1403,10 @@ function getWorkerToWorkerEntrypointNamesMap(workers) {
|
|
|
1398
1403
|
);
|
|
1399
1404
|
for (const worker of workers) {
|
|
1400
1405
|
for (const value of Object.values(worker.serviceBindings ?? {})) {
|
|
1401
|
-
if (typeof value === "object" && "name" in value &&
|
|
1402
|
-
const
|
|
1403
|
-
|
|
1404
|
-
);
|
|
1405
|
-
assert4(entrypointNames, missingWorkerErrorMessage(value.name));
|
|
1406
|
+
if (typeof value === "object" && "name" in value && value.entrypoint !== void 0 && value.entrypoint !== "default") {
|
|
1407
|
+
const targetWorkerName = value.name === kCurrentWorker ? worker.name : value.name;
|
|
1408
|
+
const entrypointNames = workerToWorkerEntrypointNamesMap.get(targetWorkerName);
|
|
1409
|
+
assert4(entrypointNames, missingWorkerErrorMessage(targetWorkerName));
|
|
1406
1410
|
entrypointNames.add(value.entrypoint);
|
|
1407
1411
|
}
|
|
1408
1412
|
}
|
|
@@ -9216,7 +9220,7 @@ function cloudflare2(pluginConfig = {}) {
|
|
|
9216
9220
|
}
|
|
9217
9221
|
} : void 0,
|
|
9218
9222
|
builder: {
|
|
9219
|
-
|
|
9223
|
+
buildApp: userConfig.builder?.buildApp ?? (async (builder) => {
|
|
9220
9224
|
const clientEnvironment = builder.environments.client;
|
|
9221
9225
|
const defaultHtmlPath = path7.resolve(
|
|
9222
9226
|
builder.config.root,
|
|
@@ -9242,7 +9246,7 @@ function cloudflare2(pluginConfig = {}) {
|
|
|
9242
9246
|
)
|
|
9243
9247
|
);
|
|
9244
9248
|
}
|
|
9245
|
-
}
|
|
9249
|
+
})
|
|
9246
9250
|
}
|
|
9247
9251
|
};
|
|
9248
9252
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudflare/vite-plugin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "Cloudflare plugin for Vite",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@cloudflare/mock-npm-registry": "0.0.0",
|
|
54
54
|
"@cloudflare/workers-shared": "0.14.4",
|
|
55
55
|
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
56
|
-
"wrangler": "3.
|
|
56
|
+
"wrangler": "3.111.0"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"vite": "^6.1.0",
|