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: Allow importing css from npm package #2807

Merged
merged 2 commits into from Mar 20, 2024

Conversation

mdmower-csnw
Copy link
Contributor

Summary

Beginning with v8.0.0, exports from the npm package are restricted. Projects should still be able to import lib/index.css and lib/uswds.css. Add them to the conditional exports in package.json.

Related Issues or PRs

See comment at #2716 (comment)

How To Test

Add import '@trussworks/react-uswds/lib/index.css'; to any project .ts/.tsx file.

Let projects import lib/index.css and lib/uswds.css by adding them to
conditional exports in package.json.
@mdmower-csnw mdmower-csnw changed the title Allow importing css from npm package fix: Allow importing css from npm package Mar 7, 2024
@mdmower-csnw
Copy link
Contributor Author

@jpandersen87 and/or @werdnanoslen - would you mind reviewing?

@werdnanoslen werdnanoslen requested a review from a team March 8, 2024 19:31
@jpandersen87
Copy link
Contributor

Thanks for bringing this up. I have this change alongside some other fixes for 8.0.0 here: #2820

@mdmower-csnw
Copy link
Contributor Author

Thanks for bringing this up. I have this change alongside some other fixes for 8.0.0 here: #2820

While all your work on these fixes is very much appreciated, it's worth pointing out that combining fixes from others under your own name discourages outside contributions since there's no recorded contributions from those other people in the commit history.

@jpandersen87
Copy link
Contributor

You are absolutely correct and I apologize for this error. I am still new to practices with being a contributor to outside projects vs. a codeowner. I will rebase my branch off of yours so that the git history properly attributes you as the source for the css changes, with all other changes coming from me onwards.

@jpandersen87
Copy link
Contributor

This has been done. Apologies again @mdmower-csnw.

@werdnanoslen
Copy link
Member

@mdmower-csnw if you can update your branch, we can merge this :)

@werdnanoslen werdnanoslen merged commit 8551f35 into trussworks:main Mar 20, 2024
6 checks passed
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.

None yet

3 participants