kitze / custom-react-scripts

[DEPRECATED, use customize-cra] Allow custom config for create-react-app without ejecting
https://custom-react-scripts.netlify.com
MIT License
993 stars 97 forks source link

SCSS does not respect NODE_PATH variable #132

Closed d07RiV closed 6 years ago

d07RiV commented 6 years ago

We can specify NODE_PATH variable in the .env file to add additional source directories - specifically, setting it to project root allows us to use absolute paths.

However, this does not work with includes in SASS (and probably other CSS processors):

Module build failed:
@import 'common.scss';
^
      File to import not found or unreadable: common.scss.

With regular CRA we can pass the path to CSS processor directly (in package.json), but custom scripts removes that option.