Code Monkey home page Code Monkey logo

Comments (11)

tzellman avatar tzellman commented on April 27, 2024 1

Up to this point I've only been dabbling with Hyperx, so likely that. I have been deeply rooted in Ember for the past 5 years so I'm not as up-to-date on competing technologies.

But, yes, any help or interest would be greatly appreciated!

from hyperapp.

tzellman avatar tzellman commented on April 27, 2024 1

For the past 5 years I've only developed rich front-ends with Ember, so I am learning some of the other tooling and libraries. I was drawn to the simplicity of Hyperapp as well as the positive attitude of the maintainer @jbucaran - so I am trying to learn from others here.

And I am not using browserify. I attempted to use it just so I could handle the hyperxify transform as a pre-processing step. It wasn't worth the hassle.

from hyperapp.

jorgebucaran avatar jorgebucaran commented on April 27, 2024

@tzellman I can help out with the migration to HyperApp 0.0.12.

Are you planning to use JSX or Hyperx or both?

from hyperapp.

tzellman avatar tzellman commented on April 27, 2024

I made the changes to update to hyperapp 0.0.12. Let me know if there is a more preferred way.

from hyperapp.

jorgebucaran avatar jorgebucaran commented on April 27, 2024

LGTM:)

from hyperapp.

selfup avatar selfup commented on April 27, 2024

@tzellman This is great! 🎉

from hyperapp.

jorgebucaran avatar jorgebucaran commented on April 27, 2024

@tzellman I was able to come up with a rollup+hyperx+hyperxify build setup that works, perhaps you can update your boilerplate? 👋

This setup also uses hyperxify to transform hyperx (as well as to remove the entire module from the end bundle) into native h calls, which is a must have for a real project.

The only downside is, despite using rollup, we can't do treeshaking on hyperapp because in order to use hyperx, I also has to use require/commonjs.

tl;dr, if anyone wants to use rollup to build hyperapp apps, the ideal combo would hyperapp + jsx. For hyperx the best will always be browserify (although webpack is also okay).

from hyperapp.

tzellman avatar tzellman commented on April 27, 2024

Cool, I will look into doing that! I have no allegiance to hyperx, so I may just update to use JSX. Hopefully will have some time later... ⏳

from hyperapp.

tzellman avatar tzellman commented on April 27, 2024

So, dumb question - how does one use hyperxify (with the browserify rollup plugin) when the main (entry js) file uses ES6 import statements instead of require?

My assumption is that I would first need to transpile (using buble or babel), however I still am getting an error during the browserify/hyperxify step.

Your gist uses require. I pulled down the zip and modified it to use ES6 imports, and am having the same problem. Maybe you can lend me some insight?

from hyperapp.

jorgebucaran avatar jorgebucaran commented on April 27, 2024

@tzellman Exactly! I also wanted to do this, so rollup could do tree-shaking (e.g. get rid of the router when not using it), but hyperx is commonjs and needs to be used in the same file where you import hyperapp.

I also tried mixing import and require in the same file unsuccessfully.

Bottom line: I found rollup+hyperx's combination not desirable.

  • For JSX: browserify, webpack or rollup is okay.
  • For Hyperx: webpack or browserify are best. rollup is possible, as shown by the gist, but not as flexible.

from hyperapp.

tzellman avatar tzellman commented on April 27, 2024

Yeah, so converting to JSX seemed to be the most sane solution; also created a much smaller final payload.

I was able to keep all of my existing tooling: fly driving rollup with buble.

Thanks for all of the useful info!

from hyperapp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.