vite icon indicating copy to clipboard operation
vite copied to clipboard

Expose a tag to render vite assets

Open AngusMorton opened this issue 3 years ago • 0 comments

Description

Sometimes it's worth customising where the asset tags are rendered in the head if you need to wait for an API response to render SEO meta tags and want the client to start loading assets. The webpack bundler integration seems to support this through the <webpack-assets> tag, but the Vite integration doesn't have a similar public API.

It's currently possible using an internal API, out.global.___viteRenderAssets, but we should consider exposing a tag that behaves similarly and is documented.

Possible Implementation & Open Questions

Expose a <vite-assets> tag that causes assets to be rendered in its place instead of at the end of the head.

Is this something you're interested in working on?

I'm happy to try this if someone can point me in the right direction!

AngusMorton avatar Apr 19 '23 12:04 AngusMorton