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

DaveLindberg picture DaveLindberg  路  3Comments

xgqfrms-GitHub picture xgqfrms-GitHub  路  3Comments

JimmyLv picture JimmyLv  路  3Comments

wereHamster picture wereHamster  路  3Comments

fson picture fson  路  3Comments