activeguild / vite-plugin-sass-dts

This is a plugin that automatically creates a type file when using the CSS module type-safely.
MIT License
120 stars 18 forks source link

Support for sass file #85

Closed reekystive closed 11 months ago

reekystive commented 1 year ago

It seems this plugin does not support .sass file? I'm using this .sass file below:

Home.module.sass

.container
  font-size: large

and with vite dev server running, I get this error when I save the .sass file:

  VITE v4.4.11  ready in 393 ms

  ➜  Local:   http://localhost:5173/
  ➜  Network: use --host to expose
  ➜  press h to show help

...

e :>>  Error: expected "{".
  ╷
4 │   font-size: large
  │                   ^
  ╵
  src/Test.module.sass 4:19  root stylesheet
    at Object.wrapException (.../node_modules/.pnpm/sass@1.69.4/node_modules/sass/sass.dart.js:1252:43)
    at SpanScanner.error$3$length$position (.../node_modules/.pnpm/sass@1.69.4/node_modules/sass/sass.dart.js:78764:15)
    at SpanScanner._fail$1 (.../node_modules/.pnpm/sass@1.69.4/node_modules/sass/sass.dart.js:78889:12)
    at SpanScanner.expectChar$2$name (.../node_modules/.pnpm/sass@1.69.4/node_modules/sass/sass.dart.js:78845:12)
    at SpanScanner.expectChar$1 (.../node_modules/.pnpm/sass@1.69.4/node_modules/sass/sass.dart.js:78848:19)
    at ScssParser0.children$1 (.../node_modules/.pnpm/sass@1.69.4/node_modules/sass/sass.dart.js:107020:10)
    at ScssParser0._stylesheet0$_withChildren$1$3 (.../node_modules/.pnpm/sass@1.69.4/node_modules/sass/sass.dart.js:113620:39)
    at ScssParser0._stylesheet0$_withChildren$3 (.../node_modules/.pnpm/sass@1.69.4/node_modules/sass/sass.dart.js:113625:19)
    at ScssParser0._stylesheet0$_styleRule$2 (.../node_modules/.pnpm/sass@1.69.4/node_modules/sass/sass.dart.js:110779:20)
    at ScssParser0._stylesheet0$_styleRule$0 (.../node_modules/.pnpm/sass@1.69.4/node_modules/sass/sass.dart.js:110782:19) {
  formatted: 'Error: expected "{".\n' +
    '  ╷\n' +
    '4 │   font-size: large\n' +
    '  │                   ^\n' +
    '  ╵\n' +
    '  src/Test.module.sass 4:19  root stylesheet',
  line: 4,
  column: 19,
  file: '.../src/Test.module.sass',
  status: 1
}
activeguild commented 1 year ago

@reekystive

Thanks for the inquiry. I'll check it out.

activeguild commented 11 months ago

@reekystive

Thanks!! Fixed and released.