-
-
Notifications
You must be signed in to change notification settings - Fork 114
Closed
Description
Two questions:
- How would one merge
loaderswithuseusingmergeWithRules. Is it even possible? Any alternative? - The following test fails with
TypeError: Cannot read property 'options' of undefined.
const conf1 = {
module: {
rules:[
{
"test": "/\\.scss$|\\.sass$/",
"use": [
{
"loader": "sass-loader",
"options": {
"sourceMap": true,
"sassOptions": {
"precision": 8,
"outputStyle": "expanded"
}
}
}
]
}
]
}
};
const conf2 = {
module: {
rules:[
{
"test": "/\\.scss$|\\.sass$/",
"exclude": [
"/node_modules/",
"/v1/"
],
"loaders": [
{
"loader": "sass-resources-loader",
"options": {
"resources": [
"src/styles/includes.scss"
]
}
}
]
}
]
}
};
const mergeRules = {
module: {
rules: {
test: CustomizeRule.Match,
use: {
loader: CustomizeRule.Match,
options: CustomizeRule.Merge,
},
},
},
}
expect(mergeWithRules(mergeRules)(conf1, conf2)).toBeTruthy();I'm not sure about that, but I wouldn't expect it to fail. WDYT?
Metadata
Metadata
Assignees
Labels
No labels