Create-react-app: [Q] use absolute paths to import sass files

Created on 15 May 2017  路  5Comments  路  Source: facebook/create-react-app

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)

question

Most helpful comment

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

All 5 comments

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

@kellyrmilligan Mind sending a PR to add this to the Sass integration doc?

done!

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ap13p picture ap13p  路  3Comments

oltsa picture oltsa  路  3Comments

fson picture fson  路  3Comments

alleroux picture alleroux  路  3Comments

fson picture fson  路  3Comments