-
-
Notifications
You must be signed in to change notification settings - Fork 944
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: set sideEffect to false in package.json #1305
Conversation
I think our See line 143, we store a result in a global store (at least if we use the default store). faker/src/modules/unique/unique.ts Lines 142 to 145 in f78843e
Or am I misinterpreting? |
Codecov Report
@@ Coverage Diff @@
## main #1305 +/- ##
==========================================
- Coverage 99.63% 99.62% -0.01%
==========================================
Files 2160 2160
Lines 240614 240614
Branches 1017 1013 -4
==========================================
- Hits 239730 239706 -24
- Misses 863 887 +24
Partials 21 21
|
It's fine as this store is local to the package and does not create sideEffect outside of package scope |
Ok, I see. The scope is per package, my bad. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Read a bit about what that is, and yeah, looks like its file for us to set that
@ST-DDT would you like to check independent from me if you are also okay with this?
That way I cannot bias you with my knowledge
I have trouble understanding, what this requires exactly. |
Based on my comment I send here: mitodl/open-discussions#3714 (comment) |
Ran into treeshaking issue in Webpack and found
sideEffect
is not declared in package.json. https://webpack.js.org/configuration/optimization/#optimizationsideeffectsThis PR is setting
sideEffect: false
in package.json in order to enable Treeshaking. I've go over the code and it doesn't seems we have side effects so it should be safe to set it to false.