How can custom/external paths be added to include paths used by sass in latest sage (9.x)?
I sifted through the webpack config and scripts but I can’t find the place that is responsible for compiling with sass.
I was able to configure the includePath in webpack.config.js:
`sass?${sourceMapQueryStr}&includePaths[]=/share/scss/`,
Options are passed to plugins like parameters in URLs.
Alternatively an object can be passed instead the string sass?${sourceMapQueryStr}
,:
[...],
`resolve-url?${sourceMapQueryStr}`,
{
loader: `sass?${sourceMapQueryStr}`,
options: {
includePaths: ['/share/scss/']
}
}
If anyone is interested in using eyeglass with sass-loader in webpack,
here the adjusted code/config for integrating it - example for extra include paths included:
[...]
{
test: /\.scss$/,
include: config.paths.assets,
use: ExtractTextPlugin.extract({
fallback: 'style',
publicPath: '../',
use: [
`css?${sourceMapQueryStr}`,
'postcss',
`resolve-url?${sourceMapQueryStr}`,
{
loader: `sass?${sourceMapQueryStr}`,
options: eyeglass({
// sass options...
includePaths: ['/share/scss/'],
eyeglass: {
// eyeglass options
}
})
}
],
}),
},
[...]