diff options
author | 2023-01-09 22:59:20 +0100 | |
---|---|---|
committer | 2023-01-09 16:59:20 -0500 | |
commit | 1f92d64ea35c03fec43aff64eaf704dc5a9eb30a (patch) | |
tree | 08f65d274320dbff2b7a869032adb0f725a4aa64 /packages/webapi/run/build.js | |
parent | 9bb08bfe8c400d468de454c69810e18794263439 (diff) | |
download | astro-1f92d64ea35c03fec43aff64eaf704dc5a9eb30a.tar.gz astro-1f92d64ea35c03fec43aff64eaf704dc5a9eb30a.tar.zst astro-1f92d64ea35c03fec43aff64eaf704dc5a9eb30a.zip |
Drop Node 14 support (#5782)
* chore: Update engines field
* fix(deps): Remove node-fetch
* feat(polyfills): Remove node-fetch for undici
* feat(webapi): Remove node-fetch from the webapis polyfills for undici
* feat(core): Remove node-fetch for undici in Astro core
* feat(telemetry): Remove node-fetch for undici
* feat(node): Remove node-fetch for undici in node integration
* feat(vercel): Remove node-fetch for undici in Vercel integration
* chore: update lockfile
* chore: update lockfile
* chore: changeset
* fix(set): Fix set directives not streaming correctly on Node 16
* Try another approach
* Debugging
* Debug fetch
* Use global fetch if there is one
* changeset for lit
* Remove web-streams-polyfill
* Remove web-streams-polyfill license note
* Update .changeset/stupid-wolves-explain.md
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Diffstat (limited to 'packages/webapi/run/build.js')
-rw-r--r-- | packages/webapi/run/build.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/packages/webapi/run/build.js b/packages/webapi/run/build.js index 63e17e84c..154d6ffbd 100644 --- a/packages/webapi/run/build.js +++ b/packages/webapi/run/build.js @@ -1,17 +1,17 @@ -import { rollup } from 'rollup' +import { default as alias } from '@rollup/plugin-alias' +import { default as inject } from '@rollup/plugin-inject' import { nodeResolve } from '@rollup/plugin-node-resolve' -import path from 'node:path' -import { createRequire } from 'node:module' +import { default as typescript } from '@rollup/plugin-typescript' +import { default as MagicString } from 'magic-string' import { readFile as nodeReadFile, rename, rm, writeFile, } from 'node:fs/promises' -import { default as MagicString } from 'magic-string' -import { default as alias } from '@rollup/plugin-alias' -import { default as inject } from '@rollup/plugin-inject' -import { default as typescript } from '@rollup/plugin-typescript' +import { createRequire } from 'node:module' +import path from 'node:path' +import { rollup } from 'rollup' const readFileCache = Object.create(null) const require = createRequire(import.meta.url) @@ -76,13 +76,13 @@ const plugins = [ MediaQueryList: ['./MediaQueryList', 'MediaQueryList'], Node: ['./Node', 'Node'], ReadableStream: [ - 'web-streams-polyfill/dist/ponyfill.es6.mjs', + 'node:stream/web', 'ReadableStream', ], ShadowRoot: ['./Node', 'ShadowRoot'], Window: ['./Window', 'Window'], 'globalThis.ReadableStream': [ - 'web-streams-polyfill/dist/ponyfill.es6.mjs', + 'node:stream/web', 'ReadableStream', ], }), @@ -178,7 +178,7 @@ async function build() { inputOptions: { input: 'src/polyfill.ts', plugins: plugins, - external: ['node-fetch', 'global-agent'], + external: ['undici', 'global-agent'], onwarn(warning, warn) { if (warning.code !== 'UNRESOLVED_IMPORT') warn(warning) }, |