diff --git a/documentation/docs/10-getting-started/40-web-standards.md b/documentation/docs/10-getting-started/40-web-standards.md index e18906146742..81fc10d8b25a 100644 --- a/documentation/docs/10-getting-started/40-web-standards.md +++ b/documentation/docs/10-getting-started/40-web-standards.md @@ -4,9 +4,7 @@ title: Web standards Throughout this documentation, you'll see references to the standard [Web APIs](https://developer.mozilla.org/en-US/docs/Web/API) that SvelteKit builds on top of. Rather than reinventing the wheel, we _use the platform_, which means your existing web development skills are applicable to SvelteKit. Conversely, time spent learning SvelteKit will help you be a better web developer elsewhere. -These APIs are available in all modern browsers and in many non-browser environments like Cloudflare Workers, Deno, and Vercel Functions. During development, and in [adapters](adapters) for Node-based environments (including AWS Lambda), they're made available via polyfills where necessary (for now, that is — Node is rapidly adding support for more web standards). - -In particular, you'll get comfortable with the following: +These APIs are available in all modern browsers and in many non-browser environments like Cloudflare Workers, Deno, and Vercel Functions. In particular, you'll get comfortable with the following: ## Fetch APIs diff --git a/packages/kit/src/exports/node/polyfills.js b/packages/kit/src/exports/node/polyfills.js deleted file mode 100644 index 347c68cea2e9..000000000000 --- a/packages/kit/src/exports/node/polyfills.js +++ /dev/null @@ -1,30 +0,0 @@ -import buffer from 'node:buffer'; -import { webcrypto as crypto } from 'node:crypto'; - -// `buffer.File` was added in Node 18.13.0 while the `File` global was added in Node 20.0.0 -const File = /** @type {import('node:buffer') & { File?: File}} */ (buffer).File; - -/** @type {Record} */ -const globals = { - crypto, - File -}; - -// exported for dev/preview and node environments -/** - * Make various web APIs available as globals: - * - `crypto` - * - `File` - */ -export function installPolyfills() { - for (const name in globals) { - if (name in globalThis) continue; - - Object.defineProperty(globalThis, name, { - enumerable: true, - configurable: true, - writable: true, - value: globals[name] - }); - } -}