sass / dart-sass

The reference implementation of Sass, written in Dart.
https://sass-lang.com/dart-sass
MIT License
3.97k stars 360 forks source link

Check require.main for null before getting require.main.filename #2179

Closed jamesnw closed 8 months ago

jamesnw commented 8 months ago

Addresses #2178. This allows Sass in ESM to throw with the correct error message regarding needing to set an entry point directory, instead of throwing with reading "filename" of undefined.

jamesnw commented 8 months ago

For reasons not yet clear, this seems to be breaking the existing CommonJS functionality. Fixed.

jamesnw commented 8 months ago

Superceded by #2181