Skip to content
This repository has been archived by the owner on Sep 3, 2023. It is now read-only.

Tree-shaking #2

Open
onexdata opened this issue Sep 9, 2019 · 1 comment
Open

Tree-shaking #2

onexdata opened this issue Sep 9, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@onexdata
Copy link

onexdata commented Sep 9, 2019

Adding tree-shaking is low hanging fruit since this module will have every component registered globally.

You can go through each components template and log where it is called and how many times.
You can go through each components $options and see where state is called and how many times.

If a component is not called, or an action/mutation is not called, it can be flagged for removal, or at least warn the developer that a component is being bundled that is never actually used.

In a production build, the unused components can simply be left out of the final build.

@AmirrezaNasiri
Copy link
Collaborator

This is a great idea indeed! Unfortunately I'm currently busy with my projects but I'll definitely consider this one. For now, a pull request would be very very welcome ✌

@AmirrezaNasiri AmirrezaNasiri added the enhancement New feature or request label Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants