migrator
migrator copied to clipboard
Handle case where configuration variable has already been patched
Right now something like:
// entrypoint.scss
$background: mix(red, blue)
@import "library";
// _library.scss
$background: green !default;
would error, since the patch to add the color namespace and the patch to delete the configuration variable would conflict.
We should handle this case by removing the existing patches and instead applying them to the configuration, e.g:
@use "sass:color";
@use "library" with ($background: color.mix(red, blue));
In the first example, is $background: green supposed to have a !default flag?
Yes. Fixed.