-
-
Notifications
You must be signed in to change notification settings - Fork 430
Closed
Description
This works:
//...
module: {
rules: [{
// ...
},{
test: /\.scss$/,
exclude: [/node_modules/],
use: [{
loader: 'style-loader'
},{
loader: 'css-loader'
},{
loader: 'sass-loader',
options: {
includePaths: [
path.resolve('./node_modules/foundation-sites/scss'),
path.resolve('./src/web/sass')
]
}
}]
}]
}
// ...
While this doesn't:
const extractSass = new ExtractTextPlugin({
filename: '[name].[contenthash:7].css',
disable: env.dev === true,
allChunks: true
})
// ...
module: {
rules: [{
// ...
},{
test: /\.scss$/,
exclude: [/node_modules/],
loader: extractSass.extract({
loader: [{
loader: 'css-loader'
},{
loader: 'sass-loader',
options: {
includePaths: [
path.resolve('./node_modules/foundation-sites/scss'),
path.resolve('./src/web/sass')
]
}
}],
// use style-loader in development
fallbackLoader: 'style-loader'
})
}]
}
// ...
Seems like loader-utils getOptions is returning null, as the result of normalizeOptions
only has the directory of the requested scss file in includePaths
:
// ...
const options = normalizeOptions(this, content, webpackImporter(
resourcePath,
pify(this.resolve.bind(this)),
addNormalizedDependency
));
console.log(options.includePaths);
// ...
Prints:
[ '/ws/src/web' ]
[ '/ws/src/web/containers' ]
[ '/ws/src/web/containers' ]
I'll keep digging to try and isolate what is going on.
Metadata
Metadata
Assignees
Labels
No labels