Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass dirname as extra metadata to preset constructor. #4834

Merged
merged 9 commits into from Feb 22, 2017
Expand Up @@ -299,7 +299,7 @@ export default class OptionManager {
(presetLoc || "a preset") + " which does not accept options.");
}

if (typeof val === "function") val = val(context, options);
if (typeof val === "function") val = val(context, options, { dirname });

if (typeof val !== "object") {
throw new Error(`Unsupported preset format: ${val}.`);
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.