зеркало из https://github.com/Azure/ms-rest-js.git
Fix node-fetch require for webpack
This commit is contained in:
Родитель
dc895dcae4
Коммит
c7aca1feb4
|
@ -17,7 +17,7 @@ interface GlobalWithFetch extends NodeJS.Global {
|
|||
|
||||
const globalWithFetch = global as GlobalWithFetch;
|
||||
if (typeof globalWithFetch.fetch !== "function") {
|
||||
const fetch = require("node-fetch");
|
||||
const fetch = require("node-fetch").default;
|
||||
globalWithFetch.fetch = fetch;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче