source: undefined
};
- if (this.minifyContext.options.explicitRoot)
- context.resolvePath = absolutePathResolver(context);
- else if (this.minifyContext.options.target)
+ if (this.minifyContext.options.target)
context.resolvePath = relativePathResolver(context);
return tokenize(context);
};
-function absolutePathResolver(context) {
- var rebaseTo = path.resolve(context.outer.options.root);
-
- return function (_, sourcePath) {
- return sourcePath.replace(rebaseTo, '');
- };
-}
-
function relativePathResolver(context) {
var rebaseTo = path.resolve(context.outer.options.root, context.outer.options.target);
if (!fs.existsSync(rebaseTo) || fs.statSync(rebaseTo).isFile())