Repository: sveltejs/kit
Pull request #7328 (2022-10-20 15:08:27)

use pnpm to run scripts
To make it consistent, we can also omit the `run` part according to its [cli commands](https://pnpm.io/pnpm-cli#commands)

### Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
- [ ] It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
- [x] This message body should clearly illustrate what problems it solves.
- [ ] Ideally, include a test that fails without this PR but passes with it.

### Tests
- [x] Run the tests with `pnpm test` and lint the project with `pnpm lint` and `pnpm check`

### Changesets
- [ ] If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running `pnpm changeset` and following the prompts. All changesets should be `patch` until SvelteKit 1.0


changeset-bot[bot]: ###  ⚠️  No Changeset found

Latest commit: bcfd393cc22dc913ba8018c74b33116bf7e755ca

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. **If these changes should result in a version bump, you need to add a changeset.**

<details><summary>This PR includes no changesets</summary>

  When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

</details>

[Click here to learn what changesets are, and how to add one](https://github.com/changesets/changesets/blob/master/docs/adding-a-changeset.md).

[Click here if you're a maintainer who wants to add a changeset to this PR](https://github.com/sveltejs/kit/new/scripts?filename=.changeset/violet-ears-float.md&value=---%0A%22%40sveltejs%2Fadapter-auto%22%3A%20patch%0A%22%40sveltejs%2Fadapter-cloudflare-workers%22%3A%20patch%0A%22%40sveltejs%2Fadapter-cloudflare%22%3A%20patch%0A%22%40sveltejs%2Fadapter-netlify%22%3A%20patch%0A%22%40sveltejs%2Fadapter-node%22%3A%20patch%0A%22%40sveltejs%2Fadapter-static%22%3A%20patch%0A%22%40sveltejs%2Fadapter-vercel%22%3A%20patch%0A%22%40sveltejs%2Famp%22%3A%20patch%0A%22create-svelte%22%3A%20patch%0A%22%40sveltejs%2Fkit%22%3A%20patch%0A%22%40sveltejs%2Fpackage%22%3A%20patch%0A%22test-amp%22%3A%20patch%0A%22test-basics%22%3A%20patch%0A%22test-options-2%22%3A%20patch%0A%22test-options%22%3A%20patch%0A%22test-writes%22%3A%20patch%0A%22prerendering-test-basics%22%3A%20patch%0A%22prerendering-test-disabled%22%3A%20patch%0A%22prerendering-test-options%22%3A%20patch%0A%22prerendering-test-paths-base%22%3A%20patch%0A%22prerendering-test-trailing-slash%22%3A%20patch%0A---%0A%0Ause%20pnpm%20to%20run%20scripts%0A)



Patch:
diff --git a/.changeset/proud-peas-matter.md b/.changeset/proud-peas-matter.md
new file mode 100644
index 000000000..4172d6803
--- /dev/null
+++ b/.changeset/proud-peas-matter.md
@@ -0,0 +1,5 @@
+---
+'@sveltejs/kit': patch
+---
+
+[breaking] remove global fetch override when prerendering
diff --git a/package.json b/package.json
index fa163a1b6..91dc5a103 100644
--- a/package.json
+++ b/package.json
@@ -36,7 +36,7 @@
 		"turbo": "^1.3.4",
 		"typescript": "^4.8.2"
 	},
-	"packageManager": "pnpm@7.13.5",
+	"packageManager": "pnpm@7.13.6",
 	"engines": {
 		"pnpm": "^7.0.0"
 	},
diff --git a/packages/adapter-auto/package.json b/packages/adapter-auto/package.json
index 330dad824..e78f2b123 100644
--- a/packages/adapter-auto/package.json
+++ b/packages/adapter-auto/package.json
@@ -26,7 +26,7 @@
 	],
 	"scripts": {
 		"lint": "prettier --check . --config ../../.prettierrc --ignore-path .gitignore",
-		"format": "npm run lint -- --write",
+		"format": "pnpm lint --write",
 		"check": "tsc"
 	},
 	"dependencies": {
diff --git a/packages/adapter-cloudflare-workers/package.json b/packages/adapter-cloudflare-workers/package.json
index 479e38b70..7cd55b197 100644
--- a/packages/adapter-cloudflare-workers/package.json
+++ b/packages/adapter-cloudflare-workers/package.json
@@ -25,7 +25,7 @@
 	],
 	"scripts": {
 		"lint": "prettier --check . --config ../../.prettierrc --ignore-path .gitignore",
-		"format": "npm run lint -- --write",
+		"format": "pnpm lint --write",
 		"check": "tsc"
 	},
 	"dependencies": {
diff --git a/packages/adapter-cloudflare/package.json b/packages/adapter-cloudflare/package.json
index d0e4b75f5..ed275df1c 100644
--- a/packages/adapter-cloudflare/package.json
+++ b/packages/adapter-cloudflare/package.json
@@ -27,9 +27,9 @@
 	"scripts": {
 		"build": "esbuild src/worker.js --bundle --outfile=files/worker.js --external:SERVER --external:MANIFEST --format=esm",
 		"lint": "prettier --check . --config ../../.prettierrc --ignore-path .gitignore",
-		"format": "npm run lint -- --write",
+		"format": "pnpm lint --write",
 		"check": "tsc --skipLibCheck",
-		"prepublishOnly": "npm run build"
+		"prepublishOnly": "pnpm build"
 	},
 	"dependencies": {
 		"@cloudflare/workers-types": "^3.14.0",
diff --git a/packages/adapter-netlify/package.json b/packages/adapter-netlify/package.json
index 98bdc172a..1f41f5470 100644
--- a/packages/adapter-netlify/package.json
+++ b/packages/adapter-netlify/package.json
@@ -28,8 +28,8 @@
 		"test": "uvu src \"(spec\\.js|test[\\\\/]index\\.js)\"",
 		"check": "tsc",
 		"lint": "prettier --check . --config ../../.prettierrc --ignore-path .gitignore",
-		"format": "npm run lint -- --write",
-		"prepublishOnly": "npm run build"
+		"format": "pnpm lint --write",
+		"prepublishOnly": "pnpm build"
 	},
 	"dependencies": {
 		"@iarna/toml": "^2.2.5",
diff --git a/packages/adapter-node/package.json b/packages/adapter-node/package.json
index e99c05f83..581407727 100644
--- a/packages/adapter-node/package.json
+++ b/packages/adapter-node/package.json
@@ -28,8 +28,8 @@
 		"test": "echo \"tests temporarily disabled\" # c8 uvu tests",
 		"check": "tsc",
 		"lint": "prettier --check . --config ../../.prettierrc --ignore-path .gitignore",
-		"format": "npm run lint -- --write",
-		"prepublishOnly": "npm run build"
+		"format": "pnpm lint --write",
+		"prepublishOnly": "pnpm build"
 	},
 	"devDependencies": {
 		"@sveltejs/kit": "workspace:*",
diff --git a/packages/adapter-static/package.json b/packages/adapter-static/package.json
index 8248f8b66..a0e2aae7c 100644
--- a/packages/adapter-static/package.json
+++ b/packages/adapter-static/package.json
@@ -21,7 +21,7 @@
 	"scripts": {
 		"lint": "prettier --check . --config ../../.prettierrc --ignore-path .gitignore",
 		"check": "tsc",
-		"format": "npm run lint -- --write",
+		"format": "pnpm lint --write",
 		"test": "uvu test test.js"
 	},
 	"devDependencies": {
diff --git a/packages/adapter-vercel/package.json b/packages/adapter-vercel/package.json
index 57760a8f2..e12556858 100644
--- a/packages/adapter-vercel/package.json
+++ b/packages/adapter-vercel/package.json
@@ -24,7 +24,7 @@
 	],
 	"scripts": {
 		"lint": "prettier --check . --config ../../.prettierrc --ignore-path .gitignore",
-		"format": "npm run lint -- --write",
+		"format": "pnpm lint --write",
 		"check": "tsc"
 	},
 	"dependencies": {
diff --git a/packages/amp/package.json b/packages/amp/package.json
index 9bf148010..8e64170fa 100644
--- a/packages/amp/package.json
+++ b/packages/amp/package.json
@@ -23,6 +23,6 @@
 	],
 	"scripts": {
 		"lint": "prettier --check . --config ../../.prettierrc --ignore-path .gitignore",
-		"format": "npm run lint -- --write"
+		"format": "pnpm lint --write"
 	}
 }
diff --git a/packages/create-svelte/package.json b/packages/create-svelte/package.json
index 13a377fc5..549307527 100644
--- a/packages/create-svelte/package.json
+++ b/packages/create-svelte/package.json
@@ -31,11 +31,11 @@
 	},
 	"scripts": {
 		"build": "node scripts/build-templates",
-		"test": "npm run build && uvu test",
+		"test": "pnpm build && uvu test",
 		"check": "tsc",
 		"lint": "prettier --check . --config ../../.prettierrc --ignore-path ../../.gitignore --ignore-path .gitignore --plugin prettier-plugin-svelte --plugin-search-dir=.",
-		"format": "npm run lint -- --write",
-		"prepublishOnly": "npm run build",
+		"format": "pnpm lint --write",
+		"prepublishOnly": "pnpm build",
 		"postpublish": "echo \"Updating template repo\" && bash ./scripts/update-template-repo.sh"
 	},
 	"files": [
diff --git a/packages/kit/package.json b/packages/kit/package.json
index 9dcc7eea0..2f097967d 100644
--- a/packages/kit/package.json
+++ b/packages/kit/package.json
@@ -57,14 +57,14 @@
 		"scripts/special-types"
 	],
 	"scripts": {
-		"build": "npm run types",
+		"build": "pnpm types",
 		"lint": "prettier --check . --config ../../.prettierrc --ignore-path .gitignore",
 		"check": "tsc",
 		"check:all": "tsc && pnpm -r --filter=\"./**\" check",
-		"format": "npm run lint -- --write",
-		"prepublishOnly": "npm run build",
-		"test": "npm run test:unit && npm run test:integration",
-		"test:integration": "pnpm run -r --workspace-concurrency 1 --filter=\"./test/**\" test",
+		"format": "pnpm lint --write",
+		"prepublishOnly": "pnpm build",
+		"test": "pnpm test:unit && pnpm test:integration",
+		"test:integration": "pnpm -r --workspace-concurrency 1 --filter=\"./test/**\" test",
 		"test:unit": "uvu src \"(spec\\.js|test[\\\\/]index\\.js)\"",
 		"types": "node scripts/extract-types.js",
 		"postinstall": "node postinstall.js"
diff --git a/packages/kit/src/core/prerender/prerender.js b/packages/kit/src/core/prerender/prerender.js
index 40d04eb4d..ea711cc50 100644
--- a/packages/kit/src/core/prerender/prerender.js
+++ b/packages/kit/src/core/prerender/prerender.js
@@ -102,54 +102,15 @@ export async function prerender() {
 	});
 
 	installPolyfills();
+
+	// TODO remove this for 1.0
 	const { fetch } = globalThis;
 	globalThis.fetch = async (info, init) => {
-		/** @type {string} */
-		let url;
-
-		/** @type {RequestInit} */
-		let opts = {};
-
-		if (info instanceof Request) {
-			url = info.url;
-
-			opts = {
-				method: info.method,
-				headers: info.headers,
-				body: info.body,
-				mode: info.mode,
-				credentials: info.credentials,
-				cache: info.cache,
-				redirect: info.redirect,
-				referrer: info.referrer,
-				integrity: info.integrity
-			};
-		} else {
-			url = info.toString();
-		}
+		const url = info instanceof Request ? info.url : info.toString();
 
 		if (url.startsWith(config.prerender.origin + '/')) {
-			const request = new Request(url, opts);
-			const response = await server.respond(request, {
-				getClientAddress,
-				prerendering: {
-					dependencies: new Map()
-				}
-			});
-
-			const decoded = new URL(url).pathname;
-
-			save(
-				'dependencies',
-				response,
-				Buffer.from(await response.clone().arrayBuffer()),
-				decoded,
-				encodeURI(decoded),
-				null,
-				'fetched'
-			);
-
-			return response;
+			const sliced = url.slice(config.prerender.origin.length);
+			throw new Error(`Use \`event.fetch('${sliced}')\` instead of the global \`fetch('${url}')\``);
 		}
 
 		return fetch(info, init);
diff --git a/packages/kit/src/runtime/server/fetch.js b/packages/kit/src/runtime/server/fetch.js
index 450d047b7..1632db5b8 100644
--- a/packages/kit/src/runtime/server/fetch.js
+++ b/packages/kit/src/runtime/server/fetch.js
@@ -16,9 +16,6 @@ export function create_fetch({ event, options, state, get_cookie_header }) {
 
 		const request_body = init?.body;
 
-		/** @type {import('types').PrerenderDependency} */
-		let dependency;
-
 		return await options.hooks.handleFetch({
 			event,
 			request,
@@ -135,11 +132,6 @@ export function create_fetch({ event, options, state, get_cookie_header }) {
 
 				response = await respond(request, options, state);
 
-				if (state.prerendering) {
-					dependency = { response, body: null };
-					state.prerendering.dependencies.set(url.pathname, dependency);
-				}
-
 				const set_cookie = response.headers.get('set-cookie');
 				if (set_cookie) {
 					for (const str of set_cookie_parser.splitCookiesString(set_cookie)) {
diff --git a/packages/kit/src/runtime/server/page/load_data.js b/packages/kit/src/runtime/server/page/load_data.js
index aeffbe426..dfe50078e 100644
--- a/packages/kit/src/runtime/server/page/load_data.js
+++ b/packages/kit/src/runtime/server/page/load_data.js
@@ -106,8 +106,13 @@ export async function load_data({
 			const url = new URL(input instanceof Request ? input.url : input, event.url);
 			const same_origin = url.origin === event.url.origin;
 
-			const request_body = init?.body;
-			const dependency = same_origin && state.prerendering?.dependencies.get(url.pathname);
+			/** @type {import('types').PrerenderDependency} */
+			let dependency;
+
+			if (same_origin && state.prerendering) {
+				dependency = { response, body: null };
+				state.prerendering.dependencies.set(url.pathname, dependency);
+			}
 
 			const proxy = new Proxy(response, {
 				get(response, key, _receiver) {
@@ -127,7 +132,7 @@ export async function load_data({
 							fetched.push({
 								url: same_origin ? url.href.slice(event.url.origin.length) : url.href,
 								method: event.request.method,
-								request_body: /** @type {string | ArrayBufferView | undefined} */ (request_body),
+								request_body: /** @type {string | ArrayBufferView | undefined} */ (init?.body),
 								response_body: body,
 								response: response
 							});
@@ -165,8 +170,6 @@ export async function load_data({
 						};
 					}
 
-					// TODO arrayBuffer?
-
 					return Reflect.get(response, key, response);
 				}
 			});
diff --git a/packages/package/package.json b/packages/package/package.json
index 731fa5ec7..93548b147 100644
--- a/packages/package/package.json
+++ b/packages/package/package.json
@@ -36,7 +36,7 @@
 		"lint": "prettier --check . --config ../../.prettierrc --ignore-path .gitignore",
 		"check": "tsc",
 		"check:all": "tsc && pnpm -r --filter=\"./**\" check",
-		"format": "npm run lint -- --write",
+		"format": "pnpm lint --write",
 		"test": "uvu test \"^index.js$\""
 	},
 	"exports": {


Test patch:
diff --git a/packages/create-svelte/test/check.js b/packages/create-svelte/test/check.js
index 9d5795218..d0ca7b402 100644
--- a/packages/create-svelte/test/check.js
+++ b/packages/create-svelte/test/check.js
@@ -112,7 +112,7 @@ for (const template of fs.readdirSync('templates')) {
 			console.group(`${template}-${types}`);
 			for (const script of scripts_to_test.filter((s) => !!pkg.scripts[s])) {
 				try {
-					execSync(`pnpm run ${script}`, { cwd, stdio: 'pipe' });
+					execSync(`pnpm ${script}`, { cwd, stdio: 'pipe' });
 					console.log(`✅ ${script}`);
 				} catch (e) {
 					console.error(`❌ ${script}`);
diff --git a/packages/kit/test/apps/amp/package.json b/packages/kit/test/apps/amp/package.json
index 7a82d03d6..21f82b976 100644
--- a/packages/kit/test/apps/amp/package.json
+++ b/packages/kit/test/apps/amp/package.json
@@ -7,7 +7,7 @@
 		"build": "vite build",
 		"preview": "vite preview",
 		"check": "svelte-kit sync && tsc && svelte-check",
-		"test": "npm run test:dev && npm run test:build",
+		"test": "pnpm test:dev && pnpm test:build",
 		"test:dev": "cross-env DEV=true playwright test",
 		"test:build": "playwright test"
 	},
diff --git a/packages/kit/test/apps/basics/package.json b/packages/kit/test/apps/basics/package.json
index 76e9cf5b7..23537db75 100644
--- a/packages/kit/test/apps/basics/package.json
+++ b/packages/kit/test/apps/basics/package.json
@@ -7,7 +7,7 @@
 		"build": "vite build",
 		"preview": "vite preview",
 		"check": "svelte-kit sync && tsc && svelte-check",
-		"test": "node test/setup.js && npm run test:dev && npm run test:build",
+		"test": "node test/setup.js && pnpm test:dev && pnpm test:build",
 		"test:dev": "rimraf test/errors.json && cross-env DEV=true playwright test",
 		"test:build": "rimraf test/errors.json && playwright test"
 	},
diff --git a/packages/kit/test/apps/basics/src/routes/prerendering/mutative-endpoint/+page.server.ts b/packages/kit/test/apps/basics/src/routes/prerendering/mutative-endpoint/+page.server.ts
index 5e288445a..576d6d28b 100644
--- a/packages/kit/test/apps/basics/src/routes/prerendering/mutative-endpoint/+page.server.ts
+++ b/packages/kit/test/apps/basics/src/routes/prerendering/mutative-endpoint/+page.server.ts
@@ -1,3 +1,1 @@
-export const actions = () => {
-	return {};
-};
+export const actions = {};
diff --git a/packages/kit/test/apps/options-2/package.json b/packages/kit/test/apps/options-2/package.json
index e0ecca9b0..f24ee0c07 100644
--- a/packages/kit/test/apps/options-2/package.json
+++ b/packages/kit/test/apps/options-2/package.json
@@ -7,7 +7,7 @@
 		"build": "vite build",
 		"preview": "vite preview",
 		"check": "svelte-kit sync && tsc && svelte-check",
-		"test": "npm run test:dev && npm run test:build",
+		"test": "pnpm test:dev && pnpm test:build",
 		"test:dev": "cross-env DEV=true playwright test",
 		"test:build": "playwright test"
 	},
diff --git a/packages/kit/test/apps/options/package.json b/packages/kit/test/apps/options/package.json
index 7de8913dc..254fee6a6 100644
--- a/packages/kit/test/apps/options/package.json
+++ b/packages/kit/test/apps/options/package.json
@@ -7,7 +7,7 @@
 		"build": "vite build -c vite.custom.config.js --mode custom",
 		"preview": "vite preview -c vite.custom.config.js",
 		"check": "svelte-kit sync && tsc && svelte-check",
-		"test": "npm run test:dev && npm run test:build",
+		"test": "pnpm test:dev && pnpm test:build",
 		"test:dev": "cross-env DEV=true playwright test",
 		"test:build": "playwright test"
 	},
diff --git a/packages/kit/test/apps/writes/package.json b/packages/kit/test/apps/writes/package.json
index 33c29f48a..1ee643f2b 100644
--- a/packages/kit/test/apps/writes/package.json
+++ b/packages/kit/test/apps/writes/package.json
@@ -7,7 +7,7 @@
 		"build": "vite build",
 		"preview": "vite preview",
 		"check": "svelte-kit sync && tsc && svelte-check",
-		"test": "npm run test:dev && npm run test:build",
+		"test": "pnpm test:dev && pnpm test:build",
 		"test:dev": "rimraf test/errors.json && cross-env DEV=true playwright test",
 		"test:build": "rimraf test/errors.json && playwright test"
 	},
diff --git a/packages/kit/test/prerendering/basics/package.json b/packages/kit/test/prerendering/basics/package.json
index 24a07571e..18c935f16 100644
--- a/packages/kit/test/prerendering/basics/package.json
+++ b/packages/kit/test/prerendering/basics/package.json
@@ -7,7 +7,7 @@
 		"build": "vite build",
 		"preview": "vite preview",
 		"check": "svelte-kit sync && tsc && svelte-check",
-		"test": "svelte-kit sync && npm run build && uvu test"
+		"test": "svelte-kit sync && pnpm build && uvu test"
 	},
 	"devDependencies": {
 		"@sveltejs/kit": "workspace:*",
diff --git a/packages/kit/test/prerendering/basics/src/routes/origin/+page.server.js b/packages/kit/test/prerendering/basics/src/routes/origin/+page.server.js
index beb4362c1..14fc1c169 100644
--- a/packages/kit/test/prerendering/basics/src/routes/origin/+page.server.js
+++ b/packages/kit/test/prerendering/basics/src/routes/origin/+page.server.js
@@ -1,7 +1,7 @@
 export const prerender = true;
 
-export async function load({ url }) {
-	const res = await fetch(new URL('/origin/message.json', url.origin).href);
+export async function load({ fetch }) {
+	const res = await fetch('/origin/message.json');
 	const { message } = await res.json();
 
 	return {
diff --git a/packages/kit/test/prerendering/fallback/package.json b/packages/kit/test/prerendering/fallback/package.json
index 31bc32059..58d354b96 100644
--- a/packages/kit/test/prerendering/fallback/package.json
+++ b/packages/kit/test/prerendering/fallback/package.json
@@ -7,7 +7,7 @@
 		"build": "vite build",
 		"preview": "vite preview",
 		"check": "svelte-kit sync && tsc && svelte-check",
-		"test": "svelte-kit sync && npm run build"
+		"test": "svelte-kit sync && pnpm build"
 	},
 	"devDependencies": {
 		"@sveltejs/kit": "workspace:*",
diff --git a/packages/kit/test/prerendering/options/package.json b/packages/kit/test/prerendering/options/package.json
index 92856d2ce..ec0c79050 100644
--- a/packages/kit/test/prerendering/options/package.json
+++ b/packages/kit/test/prerendering/options/package.json
@@ -7,7 +7,7 @@
 		"build": "vite build",
 		"preview": "vite preview",
 		"check": "svelte-kit sync && tsc && svelte-check",
-		"test": "svelte-kit sync && npm run build && uvu test"
+		"test": "svelte-kit sync && pnpm build && uvu test"
 	},
 	"devDependencies": {
 		"@sveltejs/kit": "workspace:*",
diff --git a/packages/kit/test/prerendering/paths-base/package.json b/packages/kit/test/prerendering/paths-base/package.json
index 2ca2fa014..52a4084dd 100644
--- a/packages/kit/test/prerendering/paths-base/package.json
+++ b/packages/kit/test/prerendering/paths-base/package.json
@@ -7,7 +7,7 @@
 		"build": "vite build",
 		"preview": "vite preview",
 		"check": "svelte-kit sync && tsc && svelte-check",
-		"test": "svelte-kit sync && npm run build && uvu test"
+		"test": "svelte-kit sync && pnpm build && uvu test"
 	},
 	"devDependencies": {
 		"@sveltejs/kit": "workspace:*",
diff --git a/packages/kit/test/prerendering/trailing-slash/package.json b/packages/kit/test/prerendering/trailing-slash/package.json
index 3e392601f..5b33d795b 100644
--- a/packages/kit/test/prerendering/trailing-slash/package.json
+++ b/packages/kit/test/prerendering/trailing-slash/package.json
@@ -7,7 +7,7 @@
 		"build": "vite build",
 		"preview": "vite preview",
 		"check": "svelte-kit sync && tsc && svelte-check",
-		"test": "svelte-kit sync && npm run build && uvu test"
+		"test": "svelte-kit sync && pnpm build && uvu test"
 	},
 	"devDependencies": {
 		"@sveltejs/kit": "workspace:*",
diff --git a/packages/kit/test/utils.js b/packages/kit/test/utils.js
index cf7f24889..d689b62e2 100644
--- a/packages/kit/test/utils.js
+++ b/packages/kit/test/utils.js
@@ -137,7 +137,7 @@ export const config = {
 	// generous timeouts on CI
 	timeout: process.env.CI ? 45000 : 15000,
 	webServer: {
-		command: process.env.DEV ? 'npm run dev' : 'npm run build && npm run preview',
+		command: process.env.DEV ? 'pnpm dev' : 'pnpm build && pnpm preview',
 		port: process.env.DEV ? 5173 : 4173
 	},
 	retries: process.env.CI ? 5 : 0,