Unverified Commit f4d29385 authored by Jiachi Liu's avatar Jiachi Liu Committed by GitHub

Remove node fetch polyfill from base server (#33395)

* keep fetch polyfill only in dev-server, next-server (polyfilled in next.ts)
* also export worker, static paths worker since they also requires it
parent 25d064f8
...@@ -59,7 +59,6 @@ import { ...@@ -59,7 +59,6 @@ import {
import { __ApiPreviewProps } from '../server/api-utils' import { __ApiPreviewProps } from '../server/api-utils'
import loadConfig, { isTargetLikeServerless } from '../server/config' import loadConfig, { isTargetLikeServerless } from '../server/config'
import { BuildManifest } from '../server/get-page-files' import { BuildManifest } from '../server/get-page-files'
import '../server/node-polyfill-fetch'
import { normalizePagePath } from '../server/normalize-page-path' import { normalizePagePath } from '../server/normalize-page-path'
import { getPagePath } from '../server/require' import { getPagePath } from '../server/require'
import * as ciEnvironment from '../telemetry/ci-info' import * as ciEnvironment from '../telemetry/ci-info'
......
import '../server/node-polyfill-fetch'
import chalk from 'next/dist/compiled/chalk' import chalk from 'next/dist/compiled/chalk'
import getGzipSize from 'next/dist/compiled/gzip-size' import getGzipSize from 'next/dist/compiled/gzip-size'
import textTable from 'next/dist/compiled/text-table' import textTable from 'next/dist/compiled/text-table'
......
...@@ -57,7 +57,6 @@ import { execOnce } from '../shared/lib/utils' ...@@ -57,7 +57,6 @@ import { execOnce } from '../shared/lib/utils'
import { isBlockedPage, isBot } from './utils' import { isBlockedPage, isBot } from './utils'
import RenderResult from './render-result' import RenderResult from './render-result'
import { loadEnvConfig } from '@next/env' import { loadEnvConfig } from '@next/env'
import './node-polyfill-fetch'
import { PagesManifest } from '../build/webpack/plugins/pages-manifest-plugin' import { PagesManifest } from '../build/webpack/plugins/pages-manifest-plugin'
import { removePathTrailingSlash } from '../client/normalize-trailing-slash' import { removePathTrailingSlash } from '../client/normalize-trailing-slash'
import getRouteFromAssetPath from '../shared/lib/router/utils/get-route-from-asset-path' import getRouteFromAssetPath from '../shared/lib/router/utils/get-route-from-asset-path'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment