DrSensor / DrSensor/nusa

on-demand bundle size

Open
#41 0 comments 0 reactions 0 assignees View on GitHub
optimization priority: high
Dominant language
JavaScript
Stars
4
Forks
0
PR merge metrics
No merged PRs in 30d

Description

# Chunk current feature-set
- [ ] detect the current features based on usage in html
- [ ] install that feature via dynamic import

## Challenges
When targeting browser, bundle size can be sensitive. Using common plugin architecture like `vue.use`, rollup, or even class based like parcel might solve this but the bundle size tend to get big. Also, this feature only for internal implementation and not exposed for custom extension.

## Approach
For a feature that is difficult to be implemented via composition pattern on first iteration:
> inspired from suckless.tools

1. make full implementation in the main branch then remove that feature-set in different branch as patchset
2. maintain that patchset until stable
3. refactor main branch on different branch to chunk the feature-set based on that patchset

> 📨 **TLDR**
> ```console
> $ git branch --list
> main
> remove/wasm
> refactor/wasm
> ```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.