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

Remove unused code that is already being removed in minified build #98

Merged
merged 1 commit into from
May 22, 2024

Conversation

mrxz
Copy link
Contributor

@mrxz mrxz commented May 10, 2024

When generating a build using npm run dist, the following warnings are logged:

WARNING in aframe-environment-component.min.js from UglifyJs
Dropping side-effect-free statement [./index.js:370,0]
Side effects in initialization of unused variable n [./index.js:837,0]
Dropping unused function enviroGetSettings [./index.js:10,0]

This PR addresses all three of them by removing the offending code. It is technically possible for a user to depend on enviroGetSettings when using the non-minified build, but a quick search on GitHub didn't show any usages. Since it's already absent from the minified build, it would be consistent to remove it in the non-minified version as well.

@@ -366,7 +359,7 @@ AFRAME.registerComponent('environment', {
this.environmentData.playArea != oldData.playArea ||
this.environmentData.flatShading != oldData.flatShading ||
this.environmentData.groundDensity != oldData.groundDensity ||
this.environmentData.groundFrequency != oldData.groundFrequency
this.environmentData.groundFrequency != oldData.groundFrequency ||
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh shoot I missed that in my review of #97 thanks for catching that.

Copy link
Contributor

@vincentfretin vincentfretin left a comment

Choose a reason for hiding this comment

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

LGTM @dmarcos

@dmarcos
Copy link
Member

dmarcos commented May 22, 2024

Thank you!

@dmarcos dmarcos merged commit f7fe859 into supermedium:master May 22, 2024
@dmarcos
Copy link
Member

dmarcos commented May 22, 2024

Published aframe-environment-component 1.3.7

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.

None yet

3 participants