Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (resource.startsWith(knownDir))
return true;
}
const dir = path.dirname(resource);
const matches = glob.sync(path.join(dir, "{!(module)/**/*.map,*.map}"));
if (matches && matches.length > 0) {
knownSourceMapPaths.push(dir);
return true;
}
return false;
};
const _ = require("lodash");
const merge = require("webpack-merge");
const uniteRules = require("webpack-merge/lib/join-arrays-smart").uniteRules;
const mergeWdioConfigs = merge;
const mergeWebpackConfigs = merge({
customizeArray: (a, b, key) => {
if (key === "module.rules") {
const preAndPostRules = [];
const oneOfRule = a.pop();
if (!oneOfRule.oneOf)
throw new Error("Failed to merge webpack configs. The last entry in a base config's module.rules must be { oneOf: [...] }.");
b.forEach(rule => {
if (rule.enforce)
preAndPostRules.push(rule);
else
oneOfRule.oneOf.unshift(rule);
});