Skip to content
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

Pass sass options to plugin #1308

Merged
merged 5 commits into from
Oct 15, 2020
Merged

Pass sass options to plugin #1308

merged 5 commits into from
Oct 15, 2020

Conversation

drwpow
Copy link
Collaborator

@drwpow drwpow commented Oct 14, 2020

Changes

This doesn’t change how the plugin operates at all; just allows the plugin to accept flags Sass would be able to accept normally:

  • style
  • sourceMap
  • sourceMapUrls
  • embedSources
  • embedSourceMap
  • charset
  • update

While some of these options may be used more than others, it still helps our plugin to feel less like a restriction and more like a boost for Sass users.

Testing

Tests were added!

Docs

Plugin docs updated.

@drwpow drwpow requested a review from a team as a code owner October 14, 2020 15:40
@vercel
Copy link

vercel bot commented Oct 14, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/pikapkg/snowpack/l5siw1qfm
✅ Preview: https://snowpack-git-drwpow-sass-options.pikapkg.vercel.app

@FredKSchott
Copy link
Owner

+1 on the concept here, but also this is so relevant to the work we just did with Svelte. The lesson from that was "pass compiler options as a separate config, and not the top-level config". You can see them grappling with this decision 2 years later, here: sveltejs/svelte#1101 (comment)

Given that we just made that change for Svelte, lets follow the same pattern here. Instead of supporting all of these on the top -level object and then picking them out, lets instead support them on a single compilerOptions option that we can serialize and pass directly to Sass.

plugins/plugin-sass/README.md Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants