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(build): add css as having side effects #1481

Merged
merged 2 commits into from
Jan 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
"homepage": "https://github.com/chanzuckerberg/edu-design-system",
"license": "MIT",
"main": "lib/index.js",
"sideEffects": false,
"sideEffects": [
"lib/tokens/css/variables.css",
"lib/tokens/fonts.css"
Copy link
Contributor

Choose a reason for hiding this comment

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

What's happening on the Traject side without this?

When writing #1473, I didn't think this was necessary because Traject should be importing these explicitly.

Copy link
Contributor Author

@jinlee93 jinlee93 Jan 31, 2023

Choose a reason for hiding this comment

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

Copy link
Contributor

@ahuth ahuth Jan 31, 2023

Choose a reason for hiding this comment

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

Dang, thanks for digging into this. Looks like you were totally right @anniehu4.

There's still something I don't understand here about how Webpack handles tree shaking 😓

Seems like it is an intended thing, though: webpack/webpack#6741

],
"publishConfig": {
"access": "public"
},
Expand Down