activitree / scss

MIT License
1 stars 0 forks source link

Imports do not recompile #1

Open perbergland opened 8 months ago

perbergland commented 8 months ago

meteor version: 2.15

activitree:scss version: 1.0.2

Problem: Imported files are not recompiled when changed. This used to work with the fourseven version (that relied on the CachingCompiler).

My main.scss which is in the root app folder has the following partial content

...
@import "sass/card";
...

but whatever changes I make in ./saas/_card.scss, it does not get recompiled.

If I change main.scss, it does recompile that file (but not the imports).

perbergland commented 8 months ago

Deleting the plugin cache is an ugly workaround:

rm  -rf .meteor/local/plugin-cache/activitree_scss/  
perbergland commented 8 months ago

I went back and replaced this plugin with fourseven:scss@4.16.0 and then it works again, e.g. when adding some invalid code to _card.scss:

Errors prevented startup:

   While processing files with fourseven:scss (for target web.browser):
   /main.scss: Scss compiler error: Error: Invalid CSS after "  asdf:": expected expression (e.g. 1px, bold), was "$324324;"
   on line 38 of {}/sass/_card.scss
   from line 23 of {}/main.scss
   >>   asdf: $324324;
chrisstpierre commented 6 months ago

This is a big issue. I might be able to work on this when I have time, if no one else is. This package is important because fourtseven:scss / node-sass does not work on modern arm architectures

illusionfield commented 1 month ago

Hi,

I am also working on this problem as it is essential for my project. I have made good progress on it. The problem was caused by the Dart Sass compile options ignoring the importer property, and these legacy methods no longer work.

A completely new approach is needed. The repository where I am working on this is illusionfield/meteor-scss. If you are interested, it would be great to maintain a package together, and perhaps one day we can get the updates to the community package

perbergland commented 1 month ago

I would suggest abandoning this package and go with leonardoventurini:scss instead.

It is also based on Dart but works just like it should.

illusionfield commented 1 month ago

I would suggest abandoning this package and go with leonardoventurini:scss instead.

It is also based on Dart but works just like it should.

Hi, leonardoventurini:scss isn't bad, but the Dart Sass render/renderSync method is deprecated and won't work in the future. Unfortunately, this package leonardoventurini/meteor-scss uses it.

I'm trying to create a modern package, and it's really important for me to have a ready-to-use Meteor package solution available by the time Dart Sass 2.0 is released.

So I started to develop illusionfield:scss

perbergland commented 1 month ago

Fair points, I didn’t know about the details around Dart and legacy calls.