mirror of
https://github.com/withastro/astro.git
synced 2025-03-10 23:01:26 -05:00
Build edge/worker runtime with webworker ssr target (#7101)
This commit is contained in:
parent
313a48dbf1
commit
6190d11bf5
2 changed files with 2 additions and 1 deletions
|
@ -50,6 +50,7 @@
|
||||||
"@astrojs/webapi": "^2.1.1",
|
"@astrojs/webapi": "^2.1.1",
|
||||||
"@vercel/analytics": "^0.1.8",
|
"@vercel/analytics": "^0.1.8",
|
||||||
"@vercel/nft": "^0.22.1",
|
"@vercel/nft": "^0.22.1",
|
||||||
|
"esbuild": "^0.17.12",
|
||||||
"fast-glob": "^3.2.11",
|
"fast-glob": "^3.2.11",
|
||||||
"set-cookie-parser": "^2.5.1",
|
"set-cookie-parser": "^2.5.1",
|
||||||
"web-vitals": "^3.1.1"
|
"web-vitals": "^3.1.1"
|
||||||
|
|
|
@ -101,7 +101,7 @@ export default function vercelEdge({
|
||||||
}
|
}
|
||||||
|
|
||||||
vite.ssr ||= {};
|
vite.ssr ||= {};
|
||||||
vite.ssr.target ||= 'webworker';
|
vite.ssr.target = 'webworker';
|
||||||
|
|
||||||
// Vercel edge runtime is a special webworker-ish environment that supports process.env,
|
// Vercel edge runtime is a special webworker-ish environment that supports process.env,
|
||||||
// but Vite would replace away `process.env` in webworkers, so we set a define here to prevent it
|
// but Vite would replace away `process.env` in webworkers, so we set a define here to prevent it
|
||||||
|
|
Loading…
Add table
Reference in a new issue