mhanberg / jekyll-postcss

A plugin to use PostCSS plugins like Autoprefixer or Tailwind CSS with Jekyll.
MIT License
66 stars 12 forks source link

Possibility to use imports processed by other plugins like `postcss-scss` #13

Open pedropalau opened 4 years ago

pedropalau commented 4 years ago

In the following line the @import directive is always treated as a file with the .css extension, but the plugins support now the ".css", ".scss", ".sass" extensions.

https://github.com/mhanberg/jekyll-postcss/blob/acc941e01ab182552fc91ddce93560245f502b04/lib/jekyll/converters/postcss.rb#L56

Should we have the support for other filetypes or maybe allow the use with other plugins like postcss-scss?

mhanberg commented 4 years ago

So I think you are bringing up two different things, one of which I think is directly related to this issue.

1) You noticed that the plugin will only cache .css imports, not scss/sass imports (this is a bug). 2) You want to be able to use a a different css preprocessor than scss/sass.

Does that sound correct?

pedropalau commented 4 years ago

Hi @mhanberg, the first option should be the indicated for this case.

mhanberg commented 4 years ago

@peterpalau is it correct to assume that you are using @import as provided by Sass, and not provided by postcss-import?

adamzapasnik commented 4 years ago

@peterpalau is it correct to assume that you are using @import as provided by Sass, and not provided by postcss-import?

Exactly this

pedropalau commented 4 years ago

@peterpalau is it correct to assume that you are using @import as provided by Sass, and not provided by postcss-import?

Yeap, exactly that, like @DiodonHystrix said.