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

Bundled external css #176

Merged
merged 2 commits into from
Aug 17, 2021
Merged

Bundled external css #176

merged 2 commits into from
Aug 17, 2021

Conversation

samuelg0rd0n
Copy link
Contributor

@chorobin
Copy link
Contributor

Makes sense to me. I'm not sure how else you can solve the problem. A further discussion is if we should be extracting the CSS out into a separate css file which the consumer includes or is it OK to allow postcss to inject this into the head?

Also I think postcss does support minification too. I'm not sure if these .css files included in the react-day-picker are already minified. This can help reduce bundle sizes if not.

@chorobin chorobin closed this Aug 17, 2021
@chorobin chorobin reopened this Aug 17, 2021
@samuelg0rd0n
Copy link
Contributor Author

@chorobin

I think it's better not to complicate things for developers and to make them include an extra CSS file. I can image emitting a separate css file in the future when there's more external libraries in phoenix components and the bundle grows up in size. This way we could save some space and the developer would import only needed CSS but for now injecting CSS into the head seems to me the way to go.

As for the minification, I should definitely take a look at this because we're not even releasing minified versions of the bundle. I'll tackle this in an extra task.

@samuelg0rd0n samuelg0rd0n merged commit 5f24465 into master Aug 17, 2021
@samuelg0rd0n samuelg0rd0n deleted the h/external-css branch August 17, 2021 11:34
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.

Global CSS cannot be imported from within node_modules with nextjs
2 participants