stencil-sass icon indicating copy to clipboard operation
stencil-sass copied to clipboard

Option "data" is overriden

Open Mishurin opened this issue 5 years ago • 3 comments

Would it be possible to enable "data" option? Seems like it is occupied and overridden internally. See https://github.com/ionic-team/stencil-sass/blob/c55b54e0f85f9ecd579c68a31e0606e1b7b76552/src/util.ts#L17

Mishurin avatar Feb 01 '20 13:02 Mishurin

Something like renderOpts.data = opts.data + sourceText;

Then we can make sass injections right from the stencil.config

Mishurin avatar Feb 01 '20 14:02 Mishurin

Bumping up. That change would be really helpful when it comes to passing ie dynamic variables to sass files. For now, there is no simple way of doing that.

Maybe you could also consider adding another option like additionalData similar to what webpack sass-loader is doing

If you like one of the approaches I'm more than happy to submit a PR

michalklim avatar Aug 24 '20 15:08 michalklim

@michalklim the additionalData approach may be awesome! If you (or anyone else reading this) has capacity to make a PR to provide this for @stencil/sass, I think it'd be awesome. Let me know how I can help.

splitinfinities avatar Sep 24 '21 21:09 splitinfinities