Skip to content

perf(nuxt): use native fetch to get build manifest#29052

Closed
InvincibleJun wants to merge 3 commits intonuxt:mainfrom
InvincibleJun:fix/fetch-manifest
Closed

perf(nuxt): use native fetch to get build manifest#29052
InvincibleJun wants to merge 3 commits intonuxt:mainfrom
InvincibleJun:fix/fetch-manifest

Conversation

@InvincibleJun
Copy link

🔗 Linked issue

📚 Description

fix: fetch manifest.json in chrome 63. Request method has no default value at ofetch lib, it will returen 400 Bad reuqest.

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@danielroe
Copy link
Member

Would you provide a reproduction? I was able to run fetch in chrome 63 without passing method to it without any issues.

Also, Chrome 63 was released in 2017 - seven years ago. That's a bit long to be supporting this in Nuxt core, so I think it might make more sense for you to use patch-package or pnpm patch to update this line if you really need it.

@InvincibleJun
Copy link
Author

I am do something with low chrome, But I think nuxt3 is a very nice framework.So, I do something to use nuxt3 in low browser, But I find doubtful questions.
when i fetchManifest, i will return 400 Bad Request. I debugger it then find use window fetch to request with method undefined.
if update patch-package will causing chain problem. I don't how many lib use it. And I think fetch manifest method only be 'get', it will not causing any problem.

// it will return 400 Bad request
fetch('/test', { method: undefined })
// it will return 200 Ok
fetch('/test', {})

@InvincibleJun
Copy link
Author

InvincibleJun commented Sep 19, 2024

image

step in any nuxt3 project

pnpm run build 
node .output/server/index.mjs

@danielroe danielroe changed the title fix: fix in low browser 400 Bad Request perf(nuxt): use native fetch to get build manifest Oct 8, 2024
@danielroe
Copy link
Member

this is now resolved upstream in ofetch 🎉

@danielroe danielroe closed this Oct 8, 2024
@InvincibleJun
Copy link
Author

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants