@cloudflare/vite-plugin 1.40.1 → 1.41.0
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/cf-vite.mjs +5 -7
- package/dist/{dist-MawCthRW.mjs → dist-Cr__Sz5N.mjs} +203 -83
- package/dist/dist-Cr__Sz5N.mjs.map +1 -0
- package/dist/experimental-config.d.mts +9 -7
- package/dist/experimental-config.d.mts.map +1 -1
- package/dist/index.d.mts +5 -0
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +580 -277
- package/dist/index.mjs.map +1 -1
- package/dist/{package-os_6V9kZ.mjs → package-IaRylt-M.mjs} +2 -2
- package/dist/{package-os_6V9kZ.mjs.map → package-IaRylt-M.mjs.map} +1 -1
- package/package.json +8 -8
- package/dist/dist-MawCthRW.mjs.map +0 -1
package/dist/cf-vite.mjs
CHANGED
|
@@ -14,10 +14,11 @@ import { createServer } from "vite";
|
|
|
14
14
|
*
|
|
15
15
|
* Spawn contract for `dev`: parent uses `stdio: "inherit"` and forwards
|
|
16
16
|
* SIGINT/SIGTERM. Accepted flags mirror the sibling `cf-wrangler`
|
|
17
|
-
* delegate (`--
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
17
|
+
* delegate (`--mode`, `--port`, `--host`, `--local`) so the parent can
|
|
18
|
+
* drive either impl interchangeably; everything else lives in the user's
|
|
19
|
+
* `vite.config.ts` / `wrangler.jsonc` (including the wrangler config
|
|
20
|
+
* file, which is discovered by `cloudflare()` itself). `cf-vite` boots
|
|
21
|
+
* Vite via `createServer()` against the user's own config (expected to
|
|
21
22
|
* include `cloudflare()`); flags are bridged to it as documented inline.
|
|
22
23
|
*
|
|
23
24
|
* Exit codes: 0 graceful, 2 unknown verb / parse error, 130 SIGINT,
|
|
@@ -36,7 +37,6 @@ function parseArgs$1(argv) {
|
|
|
36
37
|
parsed = parseArgs({
|
|
37
38
|
args: argv,
|
|
38
39
|
options: {
|
|
39
|
-
config: { type: "string" },
|
|
40
40
|
mode: { type: "string" },
|
|
41
41
|
host: { type: "string" },
|
|
42
42
|
port: { type: "string" },
|
|
@@ -49,7 +49,6 @@ function parseArgs$1(argv) {
|
|
|
49
49
|
throw new ArgParseError(err instanceof Error ? err.message : String(err));
|
|
50
50
|
}
|
|
51
51
|
const out = {};
|
|
52
|
-
if (parsed.values.config !== void 0) out.config = parsed.values.config;
|
|
53
52
|
if (parsed.values.mode !== void 0) out.mode = parsed.values.mode;
|
|
54
53
|
if (parsed.values.host !== void 0) out.host = parsed.values.host;
|
|
55
54
|
if (parsed.values.port !== void 0) {
|
|
@@ -78,7 +77,6 @@ async function main() {
|
|
|
78
77
|
}
|
|
79
78
|
throw err;
|
|
80
79
|
}
|
|
81
|
-
if (args.config !== void 0) process.env.CLOUDFLARE_VITE_WRANGLER_CONFIG_PATH = args.config;
|
|
82
80
|
if (args.local) process.env.CLOUDFLARE_VITE_FORCE_LOCAL = "true";
|
|
83
81
|
const serverOptions = {};
|
|
84
82
|
if (args.port !== void 0) serverOptions.port = args.port;
|