You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
edit:
as https://esm.sh/#docs points out, the package boundary on its own can be worked around with importmaps but shiki also relies on exports maps in package.json and imports that dont specify the extension when doing so. (ex: https://unpkg.com/@shikijs/[email protected]/package.json) that works on unpkg specifically but i was interested in vendoring the files and that doesnt support this url rewriting with reading package.json
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
https://shiki.style/guide/install#cdn-usage recommends the use of https://esm.sh/ or https://esm.run/, however it would be much more adaptable to other CDNs if the imports did not cross package boundaries and relied on
esm.sh
's module rewriting.succintly it would be most ideal if there was a version of https://unpkg.com/[email protected]/dist/index.mjs only relied on its own
dist
folderedit:
as https://esm.sh/#docs points out, the package boundary on its own can be worked around with importmaps but shiki also relies on
exports
maps inpackage.json
and imports that dont specify the extension when doing so. (ex: https://unpkg.com/@shikijs/[email protected]/package.json) that works on unpkg specifically but i was interested in vendoring the files and that doesnt support this url rewriting with readingpackage.json
Beta Was this translation helpful? Give feedback.
All reactions