Skip to content
This repository has been archived by the owner on Dec 30, 2021. It is now read-only.

[wip] @snowpack/plugin-sass & @snowpack/plugin-postcss #167

Closed
wants to merge 1 commit into from

Conversation

drwpow
Copy link
Contributor

@drwpow drwpow commented Jul 6, 2020

Adds 2 new plugins for handling Sass & PostCSS. 💅

WIP because it’s currently blocked by:

  1. Release of Snowpack w/ updated plugin API
  2. Re-adding the original file location on disk for plugins to use (Sass needs this to resolve relative imports).

@drwpow drwpow force-pushed the drwpow/css-plugins branch 3 times, most recently from 62a6dbe to b714ff0 Compare July 6, 2020 17:02
@drwpow drwpow force-pushed the drwpow/css-plugins branch from b714ff0 to b4fcbc9 Compare July 8, 2020 01:00
@@ -0,0 +1,23 @@
const path = require("path");
const sass = require("node-sass");
Copy link
Contributor Author

@drwpow drwpow Jul 8, 2020

Choose a reason for hiding this comment

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

I’m actually pretty 👎 on node-sass. Particularly with it having some pretty fundamental issues like these:

For those not familiar, this is VERY different than Dart Sass (the default Sass CLI). It’s essentially a major version behind, and has some pretty big bugs. 🤔 I’m wondering if there’s a way to use Dart Sass’ CLI somehow in this plugin. That would certainly make this plugin not only more usable and bug-free, but possibly faster, too.

@piotr-cz
Copy link

I've never used sass, but it looks like postcss may be extended to use it: https://www.postcss.parts/tag/sass

@drwpow drwpow closed this Jul 27, 2020
@drwpow
Copy link
Contributor Author

drwpow commented Jul 27, 2020

it looks like postcss may be extended to use it: https://www.postcss.parts/tag/sass

Ah sorry—missed this comment. PostCSS can understand Sass syntax through a number of plugins, but it can’t compile it. So unfortunately, we currently do need to run both Sass + PostCSS together (though somewhat annoying, it’s a common pattern the Sass community is used to and is the default way of doing things).

@drwpow drwpow deleted the drwpow/css-plugins branch July 27, 2020 21:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants