nuxt-zero-js icon indicating copy to clipboard operation
nuxt-zero-js copied to clipboard

feat: remove `useHead` artifacts

Open harlan-zw opened this issue 2 years ago • 2 comments

With the module removing scripts from the HTML, there are a few artifacts left over which aren't being used for anything.

This PR removes Nuxt core ones (useHead) and pre-fetch API links from @nuxt/content.

I'm interested in your thoughts, and quite happy to close this PR if you think it doesn't belong.

It may cause issues if / when island hydration is supported and I haven't done much coverage with the tests.

harlan-zw avatar Sep 03 '22 12:09 harlan-zw

I like the stripping of the artifacts from vueuse/head. But we might need to refine the implementation for the other prefetches. I don't want to do anything to remove anything the user has added, though of course you're right that we don't want nuxt/content's prefetches. Do you think there is a way to tell these apart?

danielroe avatar Sep 03 '22 14:09 danielroe

Good point, I've removed the prefetching removal code.

I'll send a PR to the @nuxt/content module to add a config for toggling the prefetching

harlan-zw avatar Sep 05 '22 02:09 harlan-zw