DrSensor / nusa

incremental runtime that bring both simplicity and power into webdev (buildless, cross-language, data-driven)
MIT License
4 stars 0 forks source link

on-demand bundle size #41

Open DrSensor opened 1 year ago

DrSensor commented 1 year ago

Chunk current feature-set

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

$ git branch --list
main
remove/wasm
refactor/wasm