Skip to content

fix: pass options to silence warning #208

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

Merged
merged 1 commit into from
Mar 2, 2023
Merged

Conversation

dummdidumm
Copy link
Member

fixes #207

@@ -95,7 +95,7 @@ module.exports = function (options = {}) {
return path.resolve(dir, pkg.svelte);
}

const resolved = await this.resolve(importee, importer, { skipSelf: true });
const resolved = await this.resolve(importee, importer, { skipSelf: true, ...options });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if legal to pass in from the outside, but to prevent endless loop it would be better to put skipSelf: true after the spread

Suggested change
const resolved = await this.resolve(importee, importer, { skipSelf: true, ...options });
const resolved = await this.resolve(importee, importer, { ...options, skipSelf: true });

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like Lukas himself suggested putting it in front, so feel free to ignore this lightyen/typescript-paths#3 (comment)

@Rich-Harris Rich-Harris merged commit c4c9f1f into master Mar 2, 2023
@Rich-Harris Rich-Harris deleted the dummdidumm-patch-1 branch March 2, 2023 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants