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

Cannot process scss < 1.45.0 #164

Closed
nvh95 opened this issue Jun 28, 2022 · 2 comments · Fixed by #167
Closed

Cannot process scss < 1.45.0 #164

nvh95 opened this issue Jun 28, 2022 · 2 comments · Fixed by #167
Assignees
Labels
bug Something isn't working
Milestone

Comments

@nvh95
Copy link
Owner

nvh95 commented Jun 28, 2022

Describe the bug

If user use sass < 1.45.0. CSS transform will throw error
s.compile is not a function

The reason is that we are using sass.compile, which is introduced in version 1.45.0 (Reference).

To Reproduce

  • Make a blank npm project
  • npm i sass@1.34.1
  • node
  • const sass = require('sass')
  • console.log(sass.compile) => (undefined)

image

Expected behavior
We have 2 options:

  1. Only support sass >= 1.45.0
  2. Fallback to a legacy API to do the sass process. (https://sass-lang.com/documentation/js-api/modules#renderSync)

I think we should go with option 2. Something like this

const compiler = sass.compile || sass.renderSync

Additional context

Issue from here #153 (reply in thread)

@nvh95
Copy link
Owner Author

nvh95 commented Jun 28, 2022

cc: @ntt261298

@nvh95 nvh95 added the bug Something isn't working label Jun 28, 2022
@ntt261298 ntt261298 self-assigned this Jun 28, 2022
@ntt261298 ntt261298 mentioned this issue Jun 28, 2022
3 tasks
@nvh95 nvh95 added this to the 0.2.6 milestone Jun 29, 2022
@nvh95 nvh95 linked a pull request Jul 2, 2022 that will close this issue
3 tasks
@nvh95
Copy link
Owner Author

nvh95 commented Jul 2, 2022

Fixed in #167

@nvh95 nvh95 closed this as completed Jul 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants