Skip to content

Commit

Permalink
Remove node fetch polyfill from base server (vercel#33395)
Browse files Browse the repository at this point in the history
* keep fetch polyfill only in dev-server, next-server (polyfilled in next.ts)
* also export worker, static paths worker since they also requires it
  • Loading branch information
huozhi committed Jan 17, 2022
1 parent 25d064f commit f4d2938
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion packages/next/build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ import {
import { __ApiPreviewProps } from '../server/api-utils'
import loadConfig, { isTargetLikeServerless } from '../server/config'
import { BuildManifest } from '../server/get-page-files'
import '../server/node-polyfill-fetch'
import { normalizePagePath } from '../server/normalize-page-path'
import { getPagePath } from '../server/require'
import * as ciEnvironment from '../telemetry/ci-info'
Expand Down
1 change: 0 additions & 1 deletion packages/next/build/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import '../server/node-polyfill-fetch'
import chalk from 'next/dist/compiled/chalk'
import getGzipSize from 'next/dist/compiled/gzip-size'
import textTable from 'next/dist/compiled/text-table'
Expand Down
1 change: 0 additions & 1 deletion packages/next/server/base-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ import { execOnce } from '../shared/lib/utils'
import { isBlockedPage, isBot } from './utils'
import RenderResult from './render-result'
import { loadEnvConfig } from '@next/env'
import './node-polyfill-fetch'
import { PagesManifest } from '../build/webpack/plugins/pages-manifest-plugin'
import { removePathTrailingSlash } from '../client/normalize-trailing-slash'
import getRouteFromAssetPath from '../shared/lib/router/utils/get-route-from-asset-path'
Expand Down

0 comments on commit f4d2938

Please sign in to comment.