Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
config
);
var originalResolve = this.resolve;
this.resolve = function(context, moduleRequest, callback)
{
moduleRequest = moduleRequest
.replace(themeConfigPattern, function() { return config.themeConfigPath; })
.replace(themePattern, function() { return config.themePath; })
.replace(folderPattern, function($0, dir) { return config[dir + 'Folder']; });
return originalResolve.call(this, context, moduleRequest, callback);
};
return lessLoader.call(this, source);
};
export default function antdLessLoader(...args) {
const loaderContext = this;
const options = getOptions(loaderContext);
const newLoaderContext = { ...loaderContext };
const newOptions = overloadLessLoaderOptions(options);
delete newOptions.scssThemePath;
newLoaderContext.query = newOptions;
const scssThemePath = getScssThemePath(options);
newLoaderContext.addDependency(scssThemePath);
return lessLoader.call(newLoaderContext, ...args);
}