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

Using of .sassrc.js messes scss/sass watch #1291

Closed
safareli opened this issue May 4, 2018 · 5 comments
Closed

Using of .sassrc.js messes scss/sass watch #1291

safareli opened this issue May 4, 2018 · 5 comments

Comments

@safareli
Copy link

safareli commented May 4, 2018

This a 🐛 bug report.

🎛 Setup

.sassrc.js

module.exports = {};

(if instead i have .sassrc with {} I don't have this issue. Why do I need .sassrc.js instead of .sassrc? as it's the way to depend on staff from node_modules or bower_components etc.. see #39 (comment))

index.html

<html>
  <body>
    <script type="text/javascript" src="./index.js"></script>
  </body>
</html>

index.js

require("./index.scss");

(same issue with using just a link tag in html)

index.scss

.red { color: red; }

run parcel watch index.html and check dist/*.css it would be: (as expected)

.red {
  color: red; }

edit index.scss to and save file:

.red2 { color: red; }

now dist/*.css file would be appended with new results instead of been overwritten:

.red {
  color: red; }
.red2 {
  color: red; }

you can edit and save or just safe without editing, result of compiling current index.scss file is appended to dist/*.css

💁 Possible Solution

I guess somewhere results of compilation is appended to css file instead of overriding.

🌍 Your Environment

Software Version(s)
Parcel 1.7.1
Node 6.11.4
npm 5.4.2
node-sass 4.8.3

also see #1280

@safareli
Copy link
Author

safareli commented May 4, 2018

I did npm i and then i couldn't reproduce the issue so closing

@safareli safareli closed this as completed May 4, 2018
@kisjula
Copy link

kisjula commented May 7, 2018

Still a bug with Yarn.

@dobesv
Copy link
Contributor

dobesv commented May 18, 2018

So what is the solution here - use npm instead of yarn?

@safareli
Copy link
Author

I was not using yarn at all. maybe remove node_modules and install deps again?

@dobesv
Copy link
Contributor

dobesv commented May 20, 2018

I got rid of the .sassrc.js and used a symbolic link to solve the problem I was using that file to solve, seems to fix it.

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

No branches or pull requests

3 participants