You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LibSass defines an option include_paths that helps it resolve files correctly when using the @import directive. It's main use is to define paths that can be imported as "globals" regardless of their actual location.
In theory sass_binary should be adding transitive sources as --load-path options here but it doesn't seem to be generating those options for SassC correctly, as the following error is thrown when trying to run the Bazel build (npm run bazel):
ERROR: /hmagrini/demo_rules_sass_include_paths/hello_world/BUILD:5:1: SassCompiler hello_world/hello_world.css failed (Exit 1)
Error: file to import not found or unreadable: shared/fonts
Current dir: /private/var/tmp/_bazel_hmagrini/db2a0758eaf8ccf7d2e7f7314079fcde/bazel-sandbox/1076353526294901005/execroot/__main__/hello_world/
on line 1 of hello_world/main.scss
>> @import 'shared/fonts';
On that repo, I've set up 2 builds for the same set of files:
npm run bazel which uses rules_sass
npm run sass which uses node_sass
This should allow you to verify that this type of usage is valid by running the build that uses node_sass with npm run sass (sorry, I wasn't able to get SassC to build to check directly against it).
Adding some logging you can see the current include_paths option outputs:
I would really appreciate some pointers into what I'm missing (something in the BUILD files maybe?) or if rules_sass is not correctly generating the expected options.
The text was updated successfully, but these errors were encountered:
LibSass defines an option
include_paths
that helps it resolve files correctly when using the@import
directive. It's main use is to define paths that can be imported as "globals" regardless of their actual location.A simple example can be found here: https://github.com/hmagrini/demo_rules_sass_include_paths
In theory
sass_binary
should be adding transitive sources as--load-path
options here but it doesn't seem to be generating those options forSassC
correctly, as the following error is thrown when trying to run the Bazel build (npm run bazel
):On that repo, I've set up 2 builds for the same set of files:
npm run bazel
which usesrules_sass
npm run sass
which usesnode_sass
This should allow you to verify that this type of usage is valid by running the build that uses
node_sass
withnpm run sass
(sorry, I wasn't able to get SassC to build to check directly against it).Adding some logging you can see the current
include_paths
option outputs:SASS:
BAZEL @
0.0.3
BAZEL @
c7e0810a6c813a3bc2c9dbbc1f5d696f3c9a8f53
(aka: latest commit onmaster
)BAZEL @ Editing #L45 to
options += ["--load-path", src.path]
I would really appreciate some pointers into what I'm missing (something in the
BUILD
files maybe?) or ifrules_sass
is not correctly generating the expected options.The text was updated successfully, but these errors were encountered: