parcel icon indicating copy to clipboard operation
parcel copied to clipboard

Implement/document <link rel="prefetch" for fonts and for .js files generated by code splitting feature

Open stargazer33 opened this issue 6 months ago • 0 comments

🙋 feature request

Parcel can generate files not listed under HTML <head>. Examples:

  1. Fonts, like dist/ex/bootstrap-icons.3536be6d.woff2

  2. Files created by code splitting feature: In JS code I do typesensePromise = import('typesense') and Parcel creates dist/ex/Typesense.dd42cc95.js 167 KB

I would like to see Parcel-generated prefetch links: <link rel="prefetch" src="generated filename"> for such files.

If this already possible with Parcel - I would like to read documentation about this. Can not find it in current documentation

🤔 Expected Behavior

Parcel generates prefetch links: <link rel="prefetch" src="generated filename"> for icon fonts and JS files created by code splitting feature.

😯 Current Behavior

There are no prefetch links. Documentation does not mention this.

🔦 Context

This should improve page load speed

stargazer33 avatar Aug 26 '24 21:08 stargazer33