mirror of
https://github.com/nuxt/nuxt.git
synced 2024-12-02 10:27:15 +00:00
feat(nitro): update dependencies for node-fetch 3.x support (#1373)
This commit is contained in:
parent
54549cfc61
commit
c80353637e
@ -46,13 +46,15 @@ export function setupAppBridge (_options: any) {
|
|||||||
// Fix wp4 esm
|
// Fix wp4 esm
|
||||||
nuxt.hook('webpack:config', (configs) => {
|
nuxt.hook('webpack:config', (configs) => {
|
||||||
for (const config of configs.filter(c => c.module)) {
|
for (const config of configs.filter(c => c.module)) {
|
||||||
for (const rule of config.module.rules) {
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
if (rule.test instanceof RegExp && rule.test.test('index.mjs')) {
|
const jsRule: any = config.module.rules.find(rule => rule.test instanceof RegExp && rule.test.test('index.mjs'))
|
||||||
// @ts-ignore
|
jsRule.type = 'javascript/auto'
|
||||||
rule.type = 'javascript/auto'
|
|
||||||
}
|
config.module.rules.unshift({
|
||||||
}
|
test: /\.mjs$/,
|
||||||
|
type: 'javascript/auto',
|
||||||
|
include: [/node_modules/]
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,9 @@ export function setupNitroBridge () {
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
nuxt.options.build.indicator = false
|
nuxt.options.build.indicator = false
|
||||||
|
|
||||||
|
// Disable fetch polyfill (nitro provides it)
|
||||||
|
nuxt.options.fetch.server = false
|
||||||
|
|
||||||
// Create contexts
|
// Create contexts
|
||||||
const nitroOptions = (nuxt.options as any).nitro || {}
|
const nitroOptions = (nuxt.options as any).nitro || {}
|
||||||
const nitroContext = getNitroContext(nuxt.options, nitroOptions)
|
const nitroContext = getNitroContext(nuxt.options, nitroOptions)
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
"mime": "^2.5.2",
|
"mime": "^2.5.2",
|
||||||
"mlly": "^0.3.0",
|
"mlly": "^0.3.0",
|
||||||
"node-fetch": "^3.0.0",
|
"node-fetch": "^3.0.0",
|
||||||
"ohmyfetch": "^0.3.1",
|
"ohmyfetch": "^0.4.2",
|
||||||
"ora": "^6.0.1",
|
"ora": "^6.0.1",
|
||||||
"p-debounce": "^4.0.0",
|
"p-debounce": "^4.0.0",
|
||||||
"pathe": "^0.2.0",
|
"pathe": "^0.2.0",
|
||||||
@ -65,7 +65,7 @@
|
|||||||
"std-env": "^2.3.1",
|
"std-env": "^2.3.1",
|
||||||
"table": "^6.7.2",
|
"table": "^6.7.2",
|
||||||
"ufo": "^0.7.9",
|
"ufo": "^0.7.9",
|
||||||
"unenv": "^0.3.10",
|
"unenv": "^0.4.0",
|
||||||
"unstorage": "^0.2.9",
|
"unstorage": "^0.2.9",
|
||||||
"vue-bundle-renderer": "^0.3.2",
|
"vue-bundle-renderer": "^0.3.2",
|
||||||
"vue-server-renderer": "^2.6.14"
|
"vue-server-renderer": "^2.6.14"
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
"mlly": "^0.3.0",
|
"mlly": "^0.3.0",
|
||||||
"murmurhash-es": "^0.1.1",
|
"murmurhash-es": "^0.1.1",
|
||||||
"nuxi": "3.0.0",
|
"nuxi": "3.0.0",
|
||||||
"ohmyfetch": "^0.3.1",
|
"ohmyfetch": "^0.4.2",
|
||||||
"pathe": "^0.2.0",
|
"pathe": "^0.2.0",
|
||||||
"scule": "^0.2.1",
|
"scule": "^0.2.1",
|
||||||
"ufo": "^0.7.9",
|
"ufo": "^0.7.9",
|
||||||
|
29
yarn.lock
29
yarn.lock
@ -2667,7 +2667,7 @@ __metadata:
|
|||||||
mime: ^2.5.2
|
mime: ^2.5.2
|
||||||
mlly: ^0.3.0
|
mlly: ^0.3.0
|
||||||
node-fetch: ^3.0.0
|
node-fetch: ^3.0.0
|
||||||
ohmyfetch: ^0.3.1
|
ohmyfetch: ^0.4.2
|
||||||
ora: ^6.0.1
|
ora: ^6.0.1
|
||||||
p-debounce: ^4.0.0
|
p-debounce: ^4.0.0
|
||||||
pathe: ^0.2.0
|
pathe: ^0.2.0
|
||||||
@ -2681,7 +2681,7 @@ __metadata:
|
|||||||
table: ^6.7.2
|
table: ^6.7.2
|
||||||
ufo: ^0.7.9
|
ufo: ^0.7.9
|
||||||
unbuild: latest
|
unbuild: latest
|
||||||
unenv: ^0.3.10
|
unenv: ^0.4.0
|
||||||
unstorage: ^0.2.9
|
unstorage: ^0.2.9
|
||||||
vue: 3.2.20
|
vue: 3.2.20
|
||||||
vue-bundle-renderer: ^0.3.2
|
vue-bundle-renderer: ^0.3.2
|
||||||
@ -13268,7 +13268,7 @@ fsevents@~2.3.2:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"node-fetch@npm:^2.6.1, node-fetch@npm:^2.6.2":
|
"node-fetch@npm:^2.6.1":
|
||||||
version: 2.6.5
|
version: 2.6.5
|
||||||
resolution: "node-fetch@npm:2.6.5"
|
resolution: "node-fetch@npm:2.6.5"
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -13843,7 +13843,7 @@ fsevents@~2.3.2:
|
|||||||
mlly: ^0.3.0
|
mlly: ^0.3.0
|
||||||
murmurhash-es: ^0.1.1
|
murmurhash-es: ^0.1.1
|
||||||
nuxi: 3.0.0
|
nuxi: 3.0.0
|
||||||
ohmyfetch: ^0.3.1
|
ohmyfetch: ^0.4.2
|
||||||
pathe: ^0.2.0
|
pathe: ^0.2.0
|
||||||
scule: ^0.2.1
|
scule: ^0.2.1
|
||||||
ufo: ^0.7.9
|
ufo: ^0.7.9
|
||||||
@ -13995,6 +13995,17 @@ fsevents@~2.3.2:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"ohmyfetch@npm:^0.4.2":
|
||||||
|
version: 0.4.2
|
||||||
|
resolution: "ohmyfetch@npm:0.4.2"
|
||||||
|
dependencies:
|
||||||
|
destr: ^1.1.0
|
||||||
|
node-fetch: ^3.0.0
|
||||||
|
ufo: ^0.7.9
|
||||||
|
checksum: 91cce3271b9e47e0c29d3cf25813b1c5076b15ad62ac81e8ce8d7153d906b4d36c60cffc3e03d9dd4745604ea8e4ca886d112db355bb2a4a8282658665530b80
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"on-finished@npm:^2.3.0, on-finished@npm:~2.3.0":
|
"on-finished@npm:^2.3.0, on-finished@npm:~2.3.0":
|
||||||
version: 2.3.0
|
version: 2.3.0
|
||||||
resolution: "on-finished@npm:2.3.0"
|
resolution: "on-finished@npm:2.3.0"
|
||||||
@ -18843,20 +18854,20 @@ fsevents@~2.3.2:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"unenv@npm:^0.3.10":
|
"unenv@npm:^0.4.0":
|
||||||
version: 0.3.10
|
version: 0.4.0
|
||||||
resolution: "unenv@npm:0.3.10"
|
resolution: "unenv@npm:0.4.0"
|
||||||
dependencies:
|
dependencies:
|
||||||
buffer: ^6.0.2
|
buffer: ^6.0.2
|
||||||
defu: ^5.0.0
|
defu: ^5.0.0
|
||||||
events: ^3.2.0
|
events: ^3.2.0
|
||||||
inherits: ^2.0.4
|
inherits: ^2.0.4
|
||||||
mime: ^2.4.6
|
mime: ^2.4.6
|
||||||
node-fetch: ^2.6.2
|
node-fetch: ^3.0.0
|
||||||
process: ^0.11.10
|
process: ^0.11.10
|
||||||
upath: ^2.0.1
|
upath: ^2.0.1
|
||||||
util: ^0.12.4
|
util: ^0.12.4
|
||||||
checksum: 502a699d88bbe45e26920d74dd756b63e78e748f73963a0c62b58584f974b856367d1c3c3d697f52b889b9cc1e750d3157caa5bb0d86c51cf32d482d5c383ec8
|
checksum: d255476a4476b34f5e2be81a453f45dd62636b2b50077eca529a13d29e3fa931da5be12b20ffbe882f06ae944e311c03163ce09bbdbf2078f2116ed95b06094a
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user