React-starter-kit: Vendor.js and Client.js should be one file in production

Created on 29 Nov 2017  路  3Comments  路  Source: kriasoft/react-starter-kit

Client.js is worthless without Vendor.js and Vendor.js is worthless without Client.js. Client.js requires Vendor.js to be loaded to work.

So why make two HTTP requests? Think these files would also be smaller combined than separate (given how gzip compresses duplicates). Believe we should combine these files into one. Any rationale for not doing so in production?

Most helpful comment

Vendor may be less likely to change often than, say, client. YMMV, but you could probably put a longer cache life on your vendor bundle. This wouldn't help first hits, but could help second visits. Depends what your priorities are.

That's often the rationale behind such a decision, as far as I've experienced :)

All 3 comments

Agreed! PR is welcome :)

That's a really great idea!

Vendor may be less likely to change often than, say, client. YMMV, but you could probably put a longer cache life on your vendor bundle. This wouldn't help first hits, but could help second visits. Depends what your priorities are.

That's often the rationale behind such a decision, as far as I've experienced :)

Was this page helpful?
0 / 5 - 0 ratings