Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow custom includePaths for sass #5599

Closed
wants to merge 1 commit into from

Conversation

lixiaoyan
Copy link
Contributor

@lixiaoyan lixiaoyan commented Oct 28, 2018

Allow developers to customize includePaths for sass-loader by specify environment variable SASS_INCLUDEPATHS, e.g. SASS_INCLUDEPATHS="./node_modules".

See also: material-components/material-components-web-react#109.

Fixes #4494, #4651.

@lixiaoyan lixiaoyan force-pushed the feat/sass-include-paths branch from 6065c9f to e34f36f Compare October 29, 2018 08:22
@MarkLSky
Copy link

SASS already has support for the SASS_PATH env variable - http://sass-lang.com/documentation/Sass.html

How about just allowing this instead instead of introducting new config?

I was able to get this working just by adding this one line to env.js:

...
PUBLIC_URL: publicUrl,
SASS_PATH: process.env.SASS_PATH

@willbamford
Copy link

willbamford commented Nov 20, 2018

Adding the following to .env at root of project worked for me (basically similar/same approach as @MarkLSky has suggested):

SASS_PATH=node_modules

@lixiaoyan lixiaoyan closed this Nov 23, 2018
@jayantbh
Copy link
Contributor

Same as #5599 (comment),
For multiple directories, you can do this:

SASS_PATH=node_modules:src:some_directory

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants