As per title, this would help newcomers majorly. Could we however deal with this differently?
Food for thought.
can we use Rollup instead of Webpack and get all the same features
depends on which specific features you mean. we're probably going to investigate code-splitting in the near future, but we haven't thought too seriously about what that means.
can we use Bublé rather than Babel?
I'm not too familiar with Inferno's Babel plugin – right now Bublé has out-of-the-box support for JSX but it's naive. I'm probably not going to get much time to work on Bublé in the near future but I'm in favour of smarter JSX transformation and would welcome any help... Are there Inferno-specific things or are we talking about doing a better job of transpiling JSX across the board?
Just quickly replying as I'm in bed: regarding JSX, Inferno JSX is nothing like React JSX. Rather than create virtual DOM per each JSXElement, Inferno creates optimised elements that rip out static content and hoists them as blueprints. It's a bit difficult to describe, so if you have time, I'd check this for context: https://github.com/trueadm/inferno/blob/dev/examples/dbmonster/app.js
There are various settings that can be passed the Inferno JSX plugin: such as line object literals vs factories and optimising object references by hoisting them (e.g rather than Inferno.NodeTypes.OptVElement it creates a var NodeTypes = Inferno.NodeTypes and references OptVElement from that). There's quite a lot to it and inferno stores hashes to common nested JSX Elements so it can attempt to re-use hoisted blueprints where possible.
I would love to use Rollup instead of Webpack, and the only reason I don't is the lack of HMR, which comes in handy for development productivity.
A couple of weeks ago, I was thinking about using Webpack for development and Rollup for production, but I got afraid of having two different codes - and then a possibility of two different behaviors.
Another concern I had was: I couldn't find any way to lazy load stuff with Rollup without introducing System.JS. Is there any way to do that?
@buzinas you may consider @porsager 's https://github.com/porsager/Wright - very neat any easy to plug with any kind of project.
Maybe a short video on how to do the transition from a newly created react app to inferno would help a lot already (something like what Christian did for Cerebral2: https://www.youtube.com/watch?v=9DrMC20tkQg):
> create-react-app foo
> cd foo
> npm run eject
> ... edit config, etc to use inferno
> npm start
FYI Bublé doesn't support generators and a bunch of other features.
@nightwolfz Nope: https://gitlab.com/Rich-Harris/buble/issues/71
Let's stick with Babel for now then. Plus people will be using Stage 0 coming from react-create-app and expect the same features.
This has been done!
BTW, the link is: https://github.com/infernojs/create-inferno-app
Most helpful comment
This has been done!