`<script type=hoistmap>`
- Dominant language
- JavaScript
- Stars
- 4
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Name is inspired from rollup [`hoistTransitiveImports`](https://rollupjs.org/guide/en/#why-do-additional-imports-turn-up-in-my-entry-chunks-when-code-splitting) + importmap
The purpose is to avoid waterfall when linked modules are not bundled. As a result that unbundled module still contain import statement which cause binding to be delayed, waiting for all network request from import statement to finish.
There's 2 way to register hoistmap:
1. Inline (preferred)
2. Remotely via `src=""` attribute
hoistmap format always be in json and must be inside ``
```json
{
"worker:imports": [],
"shared:worker:imports": [],
"imports": [
"./a.js",
["./b.json", { "type": "json" }],
["./c.js", { "worker": true }],
["./d.js", { "worker": "shared" }]
],
"fetchs": []
}
```
Most of the time hoistmap are not needed when the service provider support Smart [Early Hints](https://blog.cloudflare.com/early-hints-on-cloudflare-pages/)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.