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

quiet-deps option not working for bootstrap sass imported from vendor folder

Open comi91 opened this issue 1 year ago • 1 comments

When importing bootstrap sass from vendor, like in documentation (https://symfony.com/bundles/SassBundle/current/index.html#using-bootstrap-sass), if bootstrap is older version, deprecations warnings appear on sass:build (DEPRECATION WARNING: Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.). Setting quiet-deps:true in config/symfonycasts_sass.yaml does not work in this case. Can we somehow set sass imported from vendor folder as dependancy?

comi91 avatar Feb 13 '24 09:02 comi91

To make quiet-deps work, you need to configure a load path and import the file through the load path rather than through a relative path. Going through a separate importer is the way Sass defines that the file belongs to a dependency.

The bundle configuration already supports registering load paths, so you could add %kernel.root_dir%/vendor as load path in the config and then use @import 'twbs/bootstrap/scss/bootstrap';

stof avatar Nov 19 '24 09:11 stof