Skip to content

chore: use importmap/esm.sh in demo#82

Merged
jgravois merged 1 commit intomainfrom
chore/cdn
Apr 14, 2026
Merged

chore: use importmap/esm.sh in demo#82
jgravois merged 1 commit intomainfrom
chore/cdn

Conversation

@jgravois
Copy link
Copy Markdown
Collaborator

i'm not sure why, but https://cdn.skypack.dev/arc@1 still doesn't resolve.

all these work 🤷
https://cdn.skypack.dev/arc
https://cdn.skypack.dev/arc@1.0.0
https://cdn.skypack.dev/arc@latest

this PR swaps in esm.sh and importmap syntax instead.

ref: skypackjs/skypack-cdn#365

@springmeyer
Copy link
Copy Markdown
Owner

No concern switching to something like esm, but just want to gut check: is using a cdn valuable enough to keep one or should we just build the arc.js into the bundle and load it that way?

@jgravois
Copy link
Copy Markdown
Collaborator Author

jgravois commented Apr 14, 2026

should we just build arc.js into the bundle

now that both browsers and node support ESM natively, my take is that the maintenance overhead outweighs the benefit.

using a CDN like this makes the demo 'plug n play' and points at the exact same code folks would be installing themselves via npm install arc.

caveat: esm.sh is doing a little magic behind the scenes to flatten things out into a single file. swapping in https://unpkg.com/arc@1 would load exactly what is published on npm.

Copy link
Copy Markdown
Owner

@springmeyer springmeyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sound good, thanks for the explanation.

@jgravois jgravois merged commit 163721e into main Apr 14, 2026
7 checks passed
@jgravois jgravois deleted the chore/cdn branch April 14, 2026 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants