esm.sh
esm.sh copied to clipboard
Roadmap of 2022
Roadmap List
- [ ] use cloudflare worker as front layer
- [ ] preload deps
- [ ] transform jsx/ts/tsx/vue/svelte for browsers from github
import "https://build.esm.sh/github.com/ije/ui/Button.tsx" // Content-Type: application/javascript import "https://build.esm.sh/github.com/ije/ui/Button.tsx?jsx=preact" // Content-Type: application/javascript import "https://build.esm.sh/github.com/ije/ui/Button.vue" // Content-Type: application/javascript import "https://build.esm.sh/github.com/ije/ui/Button.vue?ssr" // Content-Type: application/javascript import "https://build.esm.sh/github.com/je/ui/Button.vue?css" // Content-Type: text/css import "https://build.esm.sh/github.com/ije/ui/Button.svelte" // Content-Type: application/javascript import "https://build.esm.sh/github.com/ije/ui/Button.svelte?ssr" // Content-Type: application/javascript import "https://build.esm.sh/github.com/ije/ui/Button.svelte?css" // Content-Type: text/css
Don't forget to pin this issue instead of #99!
Does preload deps
mean defining the deep imports up front? Also, have you considered putting those imports in the response header to preload as well to help reduce the waterfall?
I believe there are some issues related to imports and version pinning that would be good to get addressed. I added a few comments to this issue after attempting to upgrade from v85 to v89 of esm.sh today.
https://github.com/ije/esm.sh/issues/325
- interopDefault appears to not work correctly.
- esm.sh version pinning doesn't always work for dependencies.
- There was a recent regression, I started getting a type issue after upgrading from v85 to v89.
I believe twind is a common module in deno so it would be good to fix issues related to importing it. fresh and nanossr both make use of twind but are using an earlier version of it, [email protected]. In my issue I'm using [email protected] which is close to being the next major release. The newer version is required to be able to use tailwindcss v3 and the forms preset.
Fixing the issue of esm.sh version pinning not always working would help improve the stability of projects depending on esm.sh. I'm lucky that when the current version was v85, I was able to vendor my dependencies. If I didn't do that my project would now be broken without me knowing how to fix it.
Is there a way to just use this library on the command line or within a nodeJs script to convert a node package?
I don't need a server, but just the logic as part of a generic build script.