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

Fix some development code not getting optimised out #2605

Merged

Conversation

absidue
Copy link
Member

@absidue absidue commented Sep 21, 2022


Fix some development code not getting optimised out

Important note
We may remove your pull request if you do not use this provided PR template correctly.

Pull Request Type
Please select what type of pull request this is:

  • Bugfix

Description
Webpack doesn't know about vue's computed properties or vuex stores, so it doesn't know how to optimise them out. This PR fixes that by marking development only code in a way that webpack understands, so it can remove the dead code properly while optimising the release builds. This PR also gets rid of some unnecessary isDev computed properties. This change doesn't make a big size or speed difference but even a 849 byte decrease in size and an unmeasurably small performance improvement are better than including dead code in a release build.

Screenshots (if appropriate)
before

after

Testing (for code that is not small enough to be easily understandable)
yarn dev and yarn build

Opening the settings will test both the geolocation names for trending the fetching of the invidious instances.

Desktop (please complete the following information):

  • OS: Windows
  • OS Version: 10
  • FreeTube version: 0.17.1

@absidue absidue added the PR: waiting for review For PRs that are complete, tested, and ready for review label Sep 21, 2022
@PrestonN PrestonN enabled auto-merge (squash) September 21, 2022 21:40
@PrestonN PrestonN merged commit fa8d423 into FreeTubeApp:development Sep 26, 2022
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Sep 26, 2022
@absidue absidue deleted the fix-development-code-removal branch September 26, 2022 20:26
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

5 participants