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

Change node-sass to sass because node-sass is deprecated #10771

Closed
jhxxs opened this issue Apr 1, 2021 · 1 comment · Fixed by #10779
Closed

Change node-sass to sass because node-sass is deprecated #10771

jhxxs opened this issue Apr 1, 2021 · 1 comment · Fixed by #10779

Comments

@jhxxs
Copy link

jhxxs commented Apr 1, 2021

Is your proposal related to a problem?

I build a small demo based on CRA, yet I encountered a problem where some sass features can't work, like @use "sass.string" and some other built-in modules.
At first I am using node-sass recommended by CRA documentation.
After trying different solutions and reviewing github issues, I found a very efficient way.

配合CRA搭建demo看sass官网文档时发现有些特性不支持,把create-react-app官方文档推荐的node-sass换成sass就ok了。

Describe the solution you'd like

If you want use new features of sass, please remove node-sass module in your CRA project and use sass instead.

npm uninstall node-sass
npm i sass --save

Additional context

Hope CRA documentation would change it or at least append a tip.

@andrewywong
Copy link
Contributor

andrewywong commented Apr 3, 2021

As mentioned in #10045, I think we should update the CRA documentation to use sass as the default module, if there are no issues migrating from node-sass. It seems like it shouldn't be a problem, since they use the same API. I also agree that we should add a note on how to migrate a project from node-sass to sass.
I can take this on if we go forward with this proposal. :)

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

Successfully merging a pull request may close this issue.

2 participants