@netlify/plugin-nextjs 4.41.4 → 4.41.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -37,7 +37,8 @@ if (!('getAll' in Headers.prototype)) {
|
|
|
37
37
|
}
|
|
38
38
|
// Next uses blob: urls to refer to local assets, so we need to intercept these
|
|
39
39
|
const _fetch = globalThis.fetch
|
|
40
|
-
|
|
40
|
+
/* type {typeof globalThis.fetch} */
|
|
41
|
+
globalThis.fetch = async function fetch (url, init) {
|
|
41
42
|
try {
|
|
42
43
|
if (url instanceof URL && url.href?.startsWith('blob:')) {
|
|
43
44
|
const key = url.href.slice(5)
|
|
@@ -74,4 +75,4 @@ if (typeof require === 'undefined') {
|
|
|
74
75
|
|
|
75
76
|
// Next edge runtime uses "self" as a function-scoped global-like object, but some of the older polyfills expect it to equal globalThis
|
|
76
77
|
// See https://nextjs.org/docs/basic-features/supported-browsers-features#polyfills
|
|
77
|
-
|
|
78
|
+
globalThis.self = { ...globalThis, fetch }
|