> const { h, app } = hyperapp
If you setup a simple build pipeline using npm/yarn + browserify you would instead:
> const { h, app } = require("hyperapp")
And if you compile your app with babel using babel-preset-es2015, etc., then you can use the ES6 import syntax.
===
Here are some gists to help you on your journey:
- hyperapp + hyperx + rollup minimal boilerplate https://gist.github.com/jbucaran/fac2c3de24e5171596fb189f9c1...
- hyperapp + hyperx + webpack minimal boilerplate https://gist.github.com/jbucaran/c6a6bdb5383a985cec6b0ae4ebe...
- hyperapp + jsx + rollup + buble minimal boilerplate https://gist.github.com/jbucaran/f714dd6d64041591e5e53dbff85...
- hyperapp + jsx + rollup minimal boilerplate https://gist.github.com/jbucaran/0c0da8f1256a0a66090151cfda7...
- hyperapp + jsx + webpack minimal boilerplate https://gist.github.com/jbucaran/6010a83891043a6e0c37a3cec68...
- hyperapp + hyperx + browserify minimal boilerplate https://gist.github.com/jbucaran/48c1edb4fb0ea1aa5415b6686cc...
- hyperapp + jsx + browserify minimal boilerplate https://gist.github.com/jbucaran/21bbf0bbb0fe973455056648831...
> import { h, app } from "hyperapp"
I might be misunderstanding here, but isn't `import` unavailable in ES5? (I.e., just a future reserved word?)