0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-03-10 23:01:26 -05:00

feat: remove webapi in favor of a smaller polyfill (#7840)

* feat: remove webapi in favor of a smaller polyfill

* test: remove old test

* test: 🤦‍♀️

* chore: changeset
This commit is contained in:
Erika 2023-07-27 18:24:39 +02:00 committed by Emanuele Stoppa
parent 9cad290f73
commit 18a0d229c3
2 changed files with 2 additions and 5 deletions

View file

@ -52,7 +52,6 @@
},
"dependencies": {
"@astrojs/internal-helpers": "^0.1.2",
"@astrojs/webapi": "^2.2.0",
"@vercel/analytics": "^0.1.11",
"@vercel/nft": "^0.22.6",
"esbuild": "^0.18.16",

View file

@ -1,14 +1,12 @@
import { polyfill } from '@astrojs/webapi';
import type { SSRManifest } from 'astro';
import { App } from 'astro/app';
import { applyPolyfills } from 'astro/app/node';
import type { IncomingMessage, ServerResponse } from 'node:http';
import { ASTRO_LOCALS_HEADER } from './adapter';
import { getRequest, setResponse } from './request-transform';
polyfill(globalThis, {
exclude: 'window document',
});
applyPolyfills();
export const createExports = (manifest: SSRManifest) => {
const app = new App(manifest);