From 17d62a9bc19b58b2d6e05c9ff6ac8b7120c498fa Mon Sep 17 00:00:00 2001 From: JinmingYang <2214962083@qq.com> Date: Tue, 12 Nov 2024 16:22:56 +0800 Subject: [PATCH] fix: hotfix fetch bug and not working with copilot --- src/extension/polyfill.ts | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/extension/polyfill.ts b/src/extension/polyfill.ts index f2127e0..832b1c9 100644 --- a/src/extension/polyfill.ts +++ b/src/extension/polyfill.ts @@ -17,21 +17,21 @@ const enableFetchPolyfill = async () => { // fuck, vscode fetch not working on v1.92.0 // we add a polyfill here - const { - default: fetch, - Headers, - Request, - Response - } = await import('node-fetch') - const { default: FormData } = await import('form-data') + // const { + // default: fetch, + // Headers, + // Request, + // Response + // } = await import('node-fetch') + // const { default: FormData } = await import('form-data') - Object.assign(globalThis, { - fetch, - FormData, - Headers, - Request, - Response - }) + // Object.assign(globalThis, { + // fetch, + // FormData, + // Headers, + // Request, + // Response + // }) } export const enablePolyfill = async () => {