rollup-plugin-sass icon indicating copy to clipboard operation
rollup-plugin-sass copied to clipboard

Support sass-embedded

Open ahmadhabannakehkaseya opened this issue 6 months ago • 2 comments

A little background:

sass-embedded is a package maintained by the same team behind sass package and is based on the Dart Sass implementation, they should have the same API except that sass is pure javascript while sass-embedded is a wrapper over native Dart Sass executable, the latter becomes faster for large projects because of that.

We need to support that runtime, it's already supported by sass-loader for webpack: https://github.com/webpack-contrib/sass-loader/releases/tag/v15.0.0

The sass-embedded package only comes with modern JS API not the legacy sass API, not sure what this plugin is based on, but it might need some work and maybe some breaking changes are expected for users.

Currently, I tried passing import * as sassRuntime from 'sass-embedded' to runtime option (I use ES Modules in rollup config, should be the same as require.resolve('sass-embedded') in CommonJS) but it failed with cannot read properties of undefined (reading 'then')

ahmadhabannakehkaseya avatar Aug 13 '24 14:08 ahmadhabannakehkaseya