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: svg-icon function breaking in monorepos #16

Merged
merged 2 commits into from
Jul 15, 2020
Merged

Conversation

marcelltoth
Copy link
Contributor

Again, there might be a better solution for this.

As usual the problem is that we assume a fixed node_modules location.

The catch block is required to not crash right away when using the code without @stoplight/ui-kit installed. This is when... you guessed it, when launching ui-kit's storybook. The function will be overridden anyway, but without the catch block a failed require.resolve will take down the entire thing right away.

@marcelltoth marcelltoth requested review from marbemac and a team July 15, 2020 09:23
@marcelltoth marcelltoth self-assigned this Jul 15, 2020
Copy link

@mallachari mallachari left a comment

Choose a reason for hiding this comment

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

Definitely better solution for monorepos . Looks good to me.
That catch is a good catch.

@marcelltoth marcelltoth merged commit ba9f8de into master Jul 15, 2020
@stoplight-bot
Copy link
Collaborator

🎉 This PR is included in version 2.0.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants