-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Minifier should preserve classes with a side effect in a static block #5588
Comments
I wonder what fix would you accept?
I found the solution 2 is kind of hard for your mentioned case. It could not simply call |
I think 1 is fine |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Describe the bug
Minifier currently removes static block if a class is not used
Found by #5578
Input code
Config
Playground link
https://play.swc.rs/?version=1.2.241&code=H4sIAAAAAAAAA02LMQqAMBAE%2B3vFoU3SWAS7oIWF%2F5BwakCIeCsI4t%2BNpHGqZZitThVWHDGg8rQJeBGMKXkK26TKefJNnFFMiIHrOZuOW%2Bd%2FthQf5Z0DY7sea9TmO5T2oYfk2iXAlMxY2yANYlpn%2FQvXyVYQigAAAA%3D%3D&config=H4sIAAAAAAAAA22TTZLjIAyF7%2BJ1FlNZ9gHmGhQB4dADkguJdFxdffcWcYxjZ3Z%2Bn%2FVAf3wPn%2ByGj%2B9hsoWhtC%2BeUex9%2BBjAZcuuxEmGn9MgtowgDfP5z%2Fk8nIYcMYa5WRzlqQBz%2B9awmgFFRbCJ4aSk0JdKKVXVhSiBxTdtLJuIAiOUzeooJTsxmJst3dFusyUy4Q5VAW%2BmQtOrHX2USKhyDfVgvXHkoYNYwEm8webzeorGIGtqe%2BjhUsexNWoxw82mamWLgvujE3pnR1eKLCZU5APaJ7uwpdAnisEUkFpwve6TIu5D%2FgFoqskyo81w4EGH0QtfyH%2BiIgadpMydJnrktdgQRq3PxBh6x1reUCRCDyrgq4NWo9sOf8Jduhw9GAhBO97N%2FBXFXbfDZJ6AQpfaNxu2Bi%2FSrEu1p20P3uBfzUpeB%2FLk2cr1yHjOF0pvR2SQK%2Fk3rI0QOsKiK3yfjrSiB20z%2BJcflZtcNxh1%2BkImtUe29lk3Qj1mTHTpK6xvMVsc%2B2b%2BPAbGL3J9mIv%2BBWHfBxnjAwAA
Expected behavior
It should not be removed
Actual behavior
No response
Version
1.2.241
Additional context
No response
The text was updated successfully, but these errors were encountered: