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

Use smaller Vue esm runtime build #3271

Merged
merged 1 commit into from
Mar 7, 2023

Conversation

absidue
Copy link
Member

@absidue absidue commented Mar 6, 2023

Use smaller Vue esm runtime build

Pull Request Type

  • Other - Build optimisation

Description

As we use vue-loader our {component}.vue templates get compiled at build time, which means we don't need to compile them at runtime. Currently we are using a the full Vue build, which contains both the runtime and compiler, switching to the runtime only build allows us to shave off a chunk of our bundle (0.04MB for the Electron build and 0.03MB for the web build).

https://v2.vuejs.org/v2/guide/installation.html#Runtime-Compiler-vs-Runtime-only

Screenshots

renderer:
renderer-before renderer-after

web:
web-before web-after

Testing

Test various functionality to check that it still works.

Desktop

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

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) March 6, 2023 17:50
@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Mar 6, 2023
@@ -1,18 +1,16 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Sneaky fixes!

@FreeTubeBot FreeTubeBot merged commit da0c069 into FreeTubeApp:development Mar 7, 2023
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Mar 7, 2023
@absidue absidue deleted the vue-runtime-build branch March 7, 2023 06:39
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request Mar 15, 2023
* development: (106 commits)
  Translated using Weblate (Swedish)
  Translated using Weblate (Swedish)
  Translated using Weblate (Swedish)
  Translated using Weblate (Portuguese (Brazil))
  Translated using Weblate (Swedish)
  Translated using Weblate (Slovak)
  Translated using Weblate (Galician)
  Setting loudness to default volume in new videos (FreeTubeApp#3203)
  Translated using Weblate (Bulgarian)
  Translated using Weblate (Russian)
  Skip the exists check for the databases, as stat does it anyway (FreeTubeApp#3272)
  Use smaller Vue esm runtime build (FreeTubeApp#3271)
  Translated using Weblate (Italian)
  Bump eslint-config-prettier from 8.6.0 to 8.7.0 (FreeTubeApp#3269)
  Bump lefthook from 1.3.1 to 1.3.3 (FreeTubeApp#3268)
  Bump rimraf from 4.1.2 to 4.3.0 (FreeTubeApp#3264)
  Bump video.js from 7.21.2 to 7.21.3 (FreeTubeApp#3265)
  Bump eslint-plugin-unicorn from 45.0.2 to 46.0.0 (FreeTubeApp#3266)
  Translated using Weblate (Georgian)
  Translated using Weblate (Lithuanian)
  ...
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.

5 participants