Modernize
See original GitHub issueTL;DR 👋
If you are reading this issue now, just be aware we considered rewriting the source in ES6 at some point, but eventually decided not to. The rationale is ES6 would make it slightly more difficult for developers to hack with Hyperapp without introducing a build system and still no CommonJS support out of the box.
Hyperapp is a minimal library and with an unchanging goal of staying forever lean and beginner friendly.
You can take an hour and read through the entire 250ish LOC here and here and you’d understand pretty much everything. Zero dependency. It’s all there, the virtual DOM, the state container, etc.
- For more information, see https://github.com/hyperapp/hyperapp/pull/48#issuecomment-277988927.
See original discussion
@maraisr Summarizing the discussion in #29, #30, #31 and #32 we'd like to modernize the code base to use more ES6 idioms and introduce webpack to bundle the distribution.
Rationale
-
Using more ES6 idioms may encourage more contributions.
-
Using more ES6 idioms means a smaller bundle for users targetting really modern browsers. For example, in production users may consume our
src
directory directly with their application and don’t babelify (or maybe babelify a some things via plugins) and use something like babili to minify modern JavaScript. This means even smaller bundles. -
Other than prototyping, examples, presentations and maybe even real small-ish apps, users will want to bundle their apps using a bundler like browserify, webpack, rollup, etc.
Issue Analytics
- State:
- Created 7 years ago
- Comments:36 (27 by maintainers)
@jorgebucaran If you’re aiming for smallest bundle size (I know you are 😉) go with Rollup & Bublé. With only quick glances, I see nothing in Hyperapp that inhibits this combo.
Webpack has a future goal of beating Rollup in footprint size, but they have a way to go. Bublé is always the right choice.
With this - I mean like, you may as well use proper function statements and not const everything