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

feat: sideEffects to package.json #6888

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

denisx
Copy link

@denisx denisx commented Dec 4, 2024

Add sideEffects to have better code split

This PR will...

Help budlers cut unused code when you use named import/export

Add sideEffects to have better code split
@robwalch robwalch added this to the 1.6.0 milestone Dec 4, 2024
Copy link
Collaborator

@robwalch robwalch left a comment

Choose a reason for hiding this comment

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

Our unit tests are included via import side-effects in https://github.com/video-dev/hls.js/blob/master/tests/index.js. That must be addressed before we can accept this change.

@denisx
Copy link
Author

denisx commented Dec 21, 2024

I compare builds (master and this pr). There are no difference beetween mjs, and about 1.5Kb at js.

@robwalch
Copy link
Collaborator

https://github.com/video-dev/hls.js/actions/runs/12154224025/job/33989518911#step:7:1

2024-12-05T17:21:25.2296119Z Finished in 0 secs / 0 secs @ 17:21:25 GMT+0000 (Coordinated Universal Time)
2024-12-05T17:21:25.2297011Z 
2024-12-05T17:21:25.2297413Z SUMMARY:
2024-12-05T17:21:25.2299640Z ✔ 0 tests completed
2024-12-05T17:21:25.3183742Z ##[error]Process completed with exit code 1.

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.

2 participants