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

Bundle in the styling? #354

Open
b-89 opened this issue Mar 11, 2022 · 4 comments
Open

Bundle in the styling? #354

b-89 opened this issue Mar 11, 2022 · 4 comments

Comments

@b-89
Copy link

b-89 commented Mar 11, 2022

Hi,

Would it be unreasonable to ask for the styling to be bundled with the react package? That way we don't need to list tippy.js as a direct dependency when we're only using it for the styling. We're fine just pulling it out as well, but then we'll lose out if there's any updates.

Thanks,
Brian

@Kazumz
Copy link

Kazumz commented Mar 24, 2022

Hi there, I can see this is an issue using Yarn Berry and up.

In Yarn Classic, I can see the .css file is present in node_modules. In Yarn Berry and up, when unplugged, the css file does not exist.

Thanks.

EDIT: It appears as it's not exported as part of Rollup here:
https://github.com/atomiks/tippyjs-react/blob/master/rollup.config.js

@b-89
Copy link
Author

b-89 commented Mar 24, 2022

Hi @Kazumz, we're using pnpm. Sorry, I should have mentioned that.

Yeah, reason we're asking is due to tippy.js being a dependency of this project, would it be practical for the styles to be available inside this package so that we don't need to directly include tippy.js in our dependencies?

Therefore, an update to the rollup.config.js could be made to include the styles as well. I don't mind making a PR for it, but I wanted to check if it made sense.

I probably should have asked in the Discussions tab.

@Kazumz
Copy link

Kazumz commented Mar 24, 2022

@b-89 What you're suggesting makes total sense to me!

We've had to include tippy.js as a direct dependency too, along with this react project - seems a bit of a waste not to isolate the two or at least reference the CSS from the rollup file here.

@b-89
Copy link
Author

b-89 commented Mar 24, 2022

Awesome! Well, now that it's apparent it would be useful for at least two projects, I'll submit a PR soon on addressing this.

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

No branches or pull requests

2 participants