insin / react-hn

React-powered Hacker News client

Home Page:https://insin.github.io/react-hn

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

At build time, concat vendor/app scripts and async load in

addyosmani opened this issue · comments

Basically, over in this: https://github.com/insin/react-hn/blob/master/src/views/index.ejs#L37

We want to concatenate both vendor and app scripts into a single bundle so at build time instead of:

    <script src="build/vendor.js"></script>
    <script src="build/app.js"></script>

We're just doing:

    <script src="build/bundle.js" async></script>

to avoid blocking.

An alternative to this approach would be ignoring concatenation and just focusing on our HTTP/2 story. I haven't deployed HTTP/2 with push support on AppEngine before, but could learn how to do so if we wanted it.

IIRC we should be able to disable vendor splitting in the nwb config, and if I'm not recalling correctly, I'll make it possible and publish a new release with that.

I might be reading it wrong (probably am!) but couldn't find a way to disable vendor splitting over in https://github.com/insin/nwb/blob/master/docs/Configuration.md#webpack-object.