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

SASS support only work for scss files not for sass files #15737

Closed
anshulguleria opened this issue Jul 31, 2020 · 6 comments · Fixed by #15830
Closed

SASS support only work for scss files not for sass files #15737

anshulguleria opened this issue Jul 31, 2020 · 6 comments · Fixed by #15830
Assignees
Milestone

Comments

@anshulguleria
Copy link

Bug report

Describe the bug

The SASS support of next-js only works for *.scss files not *.sass files.

To Reproduce

Create a *.sass files in your code and import it in any page if its *.module.sass or in _app.[js|tsx] if it contain global styles i.e. *.sass. You will start getting an error when running the dev server.

SassError: Expected newline.

But if you change them to scss extension it starts working again. Although the CSS documentation states that any of the 2 extensions can be used it works only for scss.

Expected behavior

It should work for both extensions.

Screenshots

N/A

System information

  • OS: macOS,
  • Browser (if applies) [e.g. chrome ]
  • Version of Next.js: 9.4.4
  • Version of Node.js: 12.x
@anshulguleria anshulguleria changed the title SASS support only work for scss files SASS support only work for scss files not for sass files Jul 31, 2020
@Timer
Copy link
Member

Timer commented Aug 3, 2020

Are you using the Sass syntax instead of Scss?

@anshulguleria
Copy link
Author

My file was pretty simple for testing purpose. For example:

body {
    background-color: red;
}

And for modules:

.highlight {
    background-color: yellow;
}

@Timer
Copy link
Member

Timer commented Aug 3, 2020

If you're using the .sass extension you need to use the indented syntax:

body
	background-color: red

.highlight
	background-color: yellow

@Timer Timer self-assigned this Aug 3, 2020
@Timer
Copy link
Member

Timer commented Aug 3, 2020

Updating the documentation to explain this!

Timer added a commit to Timer/next.js that referenced this issue Aug 3, 2020
@anshulguleria
Copy link
Author

Thank you. This does help.

Timer added a commit that referenced this issue Aug 4, 2020
@Timer Timer added this to the iteration 6 milestone Aug 4, 2020
@balazsorban44
Copy link
Member

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 29, 2022
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 a pull request may close this issue.

3 participants