aleph.js
aleph.js copied to clipboard
Use Official PostCSS Deno Pkg
It seems like PostCSS has an official Deno package, but it is currently lacking Typescript support. We could do some sort of type casting to get some types, or we could wait until it gets Typescript type support.
Might be worth looking into possible incompatibilities with esm.sh and the PostCSS Deno plugin, but if esm.sh is working properly (and it probably is) they should be close to entirely compatible.
that makes sense to use deno.land/x/postcss since alephjs works on Deno, the problem is that many plugins are not compatible with deno, for example if we import autoprefixer from 'https://esm.sh/autoprefixer' it will import the dependent post-css again.
and esm.sh also provides the types declaration from https://cds.esm.sh/v11/[email protected]/lib/postcss.d.ts
that makes sense to use
deno.land/x/postcsssince alephjs works on Deno, the problem is that many plugins are not compatible with deno, for example if we import autoprefixer from 'https://esm.sh/autoprefixer' it will import the dependent post-css again.
Would an NPM package redirect option for esm.sh work? https://esm.sh/autoprefixer?redirect-postcss=https://deno.land/x/postcss/mod.ts
good idea, i will extend the external option to support this:
"https://esm.sh/autoprefixer?external=postcss@https://deno.land/x/[email protected]/mod.ts"
@ije I see that there is an external thing for other NPM packages so it works for stuff like peer dependencies or something, but is an ?external option made that allows us to use the Deno PostCSS package?
not yet, the week will update it.