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

will removing unused import reduce file size #1473

Closed
artofspeed opened this issue Jan 30, 2017 · 4 comments
Closed

will removing unused import reduce file size #1473

artofspeed opened this issue Jan 30, 2017 · 4 comments

Comments

@artofspeed
Copy link

artofspeed commented Jan 30, 2017

In dev mode, browser gives warning when react have unused import. Question is, if i remove them, will the built js file (created by npm run build) have less size?

Thanks!

@tbillington
Copy link

You should just try it :) It will be very easy to tell.

@gaearon
Copy link
Contributor

gaearon commented Jan 31, 2017

Yep, give it a try :-).

@gaearon gaearon closed this as completed Jan 31, 2017
@artofspeed
Copy link
Author

artofspeed commented Jan 31, 2017

Is it possible for build system to automatically remove them?

@gaearon
Copy link
Contributor

gaearon commented Jan 31, 2017

No, imports may have side effects.

@lock lock bot locked and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants