Skip to content

Commit

Permalink
perf: remove node-fetch polyfill (#1662)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan authored Dec 15, 2024
1 parent a373b32 commit 9d9d6f7
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 59 deletions.
2 changes: 1 addition & 1 deletion packages/cli/bin/rspress.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env node
#!/usr/bin/env node --experimental-fetch
import nodeModule from 'node:module';

// enable on-disk code caching of all modules loaded by Node.js
Expand Down
1 change: 0 additions & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
"htmr": "^1.0.2",
"lodash-es": "^4.17.21",
"mdast-util-mdxjs-esm": "^1.3.1",
"node-fetch": "3.3.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-helmet-async": "^1.3.0",
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/node/searchIndex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import path, { join } from 'node:path';
import fs from '@rspress/shared/fs-extra';
import chalk from '@rspress/shared/chalk';
import type { IncomingMessage, ServerResponse } from 'node:http';
import fetch from 'node-fetch';
import { type UserConfig, isSCM, SEARCH_INDEX_NAME } from '@rspress/shared';
import { logger } from '@rspress/shared/logger';
import { isProduction, OUTPUT_DIR, TEMP_DIR } from './constants';
Expand Down
1 change: 0 additions & 1 deletion packages/plugin-api-docgen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"@types/node": "^18.11.17",
"@types/react": "^18.3.14",
"@types/react-dom": "^18.3.2",
"mdast-util-mdxjs-esm": "^1.3.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^6.28.0",
Expand Down
1 change: 0 additions & 1 deletion packages/plugin-playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
"@types/node": "^18.11.17",
"@types/react": "^18.3.14",
"@types/react-dom": "^18.3.2",
"mdast-util-mdxjs-esm": "^1.3.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^6.28.0",
Expand Down
54 changes: 0 additions & 54 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9d9d6f7

Please sign in to comment.