Skip to content

Use Official PostCSS Deno Pkg #59

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
shadowtime2000 opened this issue Dec 20, 2020 · 8 comments
Open

Use Official PostCSS Deno Pkg #59

shadowtime2000 opened this issue Dec 20, 2020 · 8 comments
Labels
∆ feature New feature

Comments

@shadowtime2000
Copy link
Member

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.

@shadowtime2000
Copy link
Member Author

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.

@ije
Copy link
Member

ije commented Dec 20, 2020

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.

@ije
Copy link
Member

ije commented Dec 20, 2020

and esm.sh also provides the types declaration from https://cds.esm.sh/v11/[email protected]/lib/postcss.d.ts

@shadowtime2000
Copy link
Member Author

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.

Would an NPM package redirect option for esm.sh work? https://esm.sh/autoprefixer?redirect-postcss=https://deno.land/x/postcss/mod.ts

@ije
Copy link
Member

ije commented Dec 20, 2020

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"

@shadowtime2000
Copy link
Member Author

@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?

@ije
Copy link
Member

ije commented Jan 11, 2021

not yet, the week will update it.

@shadowtime2000
Copy link
Member Author

postui/esm.sh#89

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
∆ feature New feature
Projects
None yet
Development

No branches or pull requests

2 participants