skovy/typed-scss-modules

`sass` compilation fails if `math` used...

gencer opened this issue · 1 comments

Expected Behavior

TSM should compile all types

Current Behavior

Undefined function.
   ╷
10 │   @return math.div($px, $base);
   │           ^^^^^^^^^^^^^^^^^^^^
   ╵
  app/javascript/assets/styles/dashboard/tools/_rem.scss 10:11                  rem()
  app/javascript/assets/styles/dashboard/main.scss 35:9                         @import
  app/javascript/assets/styles/layout.module.scss 9:9                           root stylesheet (/home/gencer/sources/portal/app/javascript/assets/styles/dashboard/tools/_rem.scss[10:11])
Done in 0.46s.

SCSS Content:

@use "sass:math"; <-- here...
// ...
@function rem($px, $base: $size) {
  @return math.div($px, $base);
}

Note. This code compiles to CSS so no issue on my end.

Possible Solution

Have no idea at the moment :)

Steps to Reproduce (for bugs)

  1. Create a sample folder with above scss content and compile.

Context

SCSS Content is above.

Your Environment

  • Version used: 4.1.1
  • Operating System and versions: Ubuntu-20.04 uses NodeJS 16 with sass (Dart)
  • Link to your project: Private

Oh no! I somehow downgraded dart-sass to few versions back. That was the cause.

Sorry!