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

fix: use require.resolve when resolving default config #5127

Merged
merged 8 commits into from
Sep 18, 2020
8 changes: 6 additions & 2 deletions packages/core/parcel/src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,15 @@ async function run(entries: Array<string>, command: any) {
}
let Parcel = require('@parcel/core').default;
let options = await normalizeOptions(command);
let packageManager = new NodePackageManager(new NodeFS());
let fs = new NodeFS();
let packageManager = new NodePackageManager(fs);
let parcel = new Parcel({
entries,
packageManager,
defaultConfig: '@parcel/config-default',
// $FlowFixMe - flow doesn't know about the `paths` option (added in Node v8.9.0)
defaultConfig: require.resolve('@parcel/config-default', {
paths: [fs.cwd(), __dirname],
}),
patchConsole: true,
...options,
});
Expand Down