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

Rollup doesn't respect sideEffects #4470

Closed
pd4d10 opened this issue Apr 18, 2022 · 3 comments · Fixed by #4867
Closed

Rollup doesn't respect sideEffects #4470

pd4d10 opened this issue Apr 18, 2022 · 3 comments · Fixed by #4867

Comments

@pd4d10
Copy link

pd4d10 commented Apr 18, 2022

Rollup Version

2.70.1

Operating System (or Browser)

macOS

Node Version (if applicable)

16

Link To Reproduction

https://stackblitz.com/edit/node-lr98tg

Expected Behaviour

As lib/common.js are listed in the sideEffects field, these lines should not be removed:

https://github.com/wooorm/lowlight/blob/0803fc3416cbdf59f204da243313e3315eb34617/lib/common.js#L1-L36

Actual Behaviour

They are removed incorrectly

Additional Information

Reproduce steps

  1. Open the reproduction link above
  2. run npm run build
  3. Check if the JS output has these highlight.js languages code bundled in

Related issues:
vitejs/vite#7635
rollup/plugins#1159

@fregante
Copy link

There are more issues found in Vite as well:

@lukastaegert
Copy link
Member

Fix at #4867

@rollup-bot
Copy link
Collaborator

This issue has been resolved via #4867 as part of rollup@3.17.2. You can test it via npm install rollup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants