-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
feat: add sideeffects to addons; #29841
base: next
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,6 +43,7 @@ | |
}, | ||
"main": "dist/index.js", | ||
"module": "dist/index.mjs", | ||
"sideEffects": false, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. style: Consider setting sideEffects to ['./dist/manager.js'] since manager entries often have initialization side effects |
||
"react-native": "dist/index.mjs", | ||
"types": "dist/index.d.ts", | ||
"typesVersions": { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,6 +75,7 @@ | |
}, | ||
"main": "dist/index.js", | ||
"module": "dist/index.mjs", | ||
"sideEffects": false, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. style: Consider setting sideEffects to an array of framework-specific files that do have side effects instead of false |
||
"types": "dist/index.d.ts", | ||
"files": [ | ||
"dist/**/*", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,6 +75,7 @@ | |
}, | ||
"main": "dist/index.js", | ||
"module": "dist/index.mjs", | ||
"sideEffects": false, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. logic: Consider checking if any of the bundled addons (actions, backgrounds, controls etc.) have initialization side effects that need to be preserved. May need to be |
||
"types": "dist/index.d.ts", | ||
"files": [ | ||
"dist/**/*", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,6 +32,7 @@ | |
}, | ||
"main": "dist/index.js", | ||
"module": "dist/index.mjs", | ||
"sideEffects": false, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. logic: react-confetti, framer-motion, and react-joyride may have side effects. Consider checking if these dependencies require side effects to function properly before marking the entire package as side-effect free. |
||
"types": "dist/index.d.ts", | ||
"files": [ | ||
"dist/**/*", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,6 +65,7 @@ | |
}, | ||
"main": "dist/index.js", | ||
"module": "dist/index.mjs", | ||
"sideEffects": false, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. logic: Setting sideEffects to false here may be problematic since this addon has setup files, global setup, and postinstall scripts that likely have side effects. Consider reviewing the actual side effects in the codebase before marking as side-effect free. |
||
"types": "dist/index.d.ts", | ||
"files": [ | ||
"dist/**/*", | ||
|
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.
logic: axe-core and accessibility testing setup often requires initialization side effects - verify that tree-shaking doesn't break the accessibility testing functionality