question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Q] use absolute paths to import sass files

See original GitHub issue

Is there a way to use absolute paths for sass imports? For example, when trying to import src/shared/variables.scss from a deeply nested component, there could be a lot of ../../../../ to import the right style file.

Related: #1712 (for importing JS files)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
kellyrmilligancommented, May 19, 2017

fuller example: "css:build": "node-sass-chokidar --include-path ./node_modules/foundation-sites/scss --include-path ./src --include-path ./node_modules src/ -o src/",

0reactions
woniesong92commented, May 19, 2017

@kellyrmilligan thanks! this is perfect. Please feel free to close the issue 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

css - How to use absolute path to import custom scss, when ...
Let's say I'm creating an MyAdminButton and I want to import scss file that concerns all the buttons of the project. (It's custom...
Read more >
Sass: @import
All Sass implementations allow users to provide load paths: paths on the filesystem that Sass will look in when resolving imports. For example,...
Read more >
absolute path - npm search
A node-sass custom importer which turns ~ into absolute paths to the nearest parent node_modules directory. node-sass · scss · sass · tilde...
Read more >
CSS : How to use absolute path to import custom scss, when ...
CSS : How to use absolute path to import custom scss, when using react + webpack?
Read more >
sass-loader - webpack - JS.ORG
Resolving import at-rules ... Webpack provides an advanced mechanism to resolve files. The sass-loader uses Sass's custom importer feature to pass all queries...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found