Parcel: Cannot provide configuration values to node-sass

Created on 22 Dec 2017  路  4Comments  路  Source: parcel-bundler/parcel

It is not possible to set configuration values for node-sass using Parcel. I would like to be able to set the node-sass configuration option includePaths so that I do not have super large import "../../../../style.scss"; lines in my scss files.

Most helpful comment

Having the same issue. includePaths actually breaks relative imports too! It's also a bit frustrating having to remember to --no-cache after changing the includePaths setting.
Even a simple import from a .scss file inside node_modules doesn't work at all.

The format of the includePaths is a bit unclear too:

  • should it be a relative path?
  • does the trailing slash that's used in some examples have an impact?

All 4 comments

You can add a .sassrc or .sassrc.js file to configure sass. We need to document that better. Can you open an issue on https://github.com/parcel-bundler/website/issues?

I beg to differ. Adding a .sassrc file with includePaths does not work. I wrestled with it for about 3 hours today before giving up and going back to relative paths.

Having the same issue. includePaths actually breaks relative imports too! It's also a bit frustrating having to remember to --no-cache after changing the includePaths setting.
Even a simple import from a .scss file inside node_modules doesn't work at all.

The format of the includePaths is a bit unclear too:

  • should it be a relative path?
  • does the trailing slash that's used in some examples have an impact?

Looks like the answer for now is here - https://github.com/parcel-bundler/parcel/issues/39#issuecomment-353722786

Was this page helpful?
0 / 5 - 0 ratings