sass-bundle
sass-bundle copied to clipboard
quiet-deps option not working for bootstrap sass imported from vendor folder
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?
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';