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(styles): fix css is not injected if imported by more than one components #patch #75

Merged
merged 1 commit into from
Jul 25, 2022

Conversation

rayhan-ab
Copy link
Collaborator

after 0.7.0, fa_icons.css is not injected to head tag and it is imported by several components. this issue is fixed in 0.7.1. Select/index.scss and ValidSelect/index.scss are also imported more than once and it turns out they're not injected as well, so I assume there is a connection between being imported by multiple components and not injected to head tag.

Solution
Let's take CreatableSelect. instead of importing Select/index.scss in index.tsx, we import it in index.scss. importing in .tsx file will only create one copy of the style, but it won't be injected. importing in .scss file will create duplication after build, but both of them will be injected. currently haven't found a solution that will create only one copy, can be imported by multiple components, but still get injected.

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

Successfully merging this pull request may close these issues.

3 participants