antwarjs / antwar

A static site generator built with React and Webpack.
https://antwar.js.org/
MIT License
460 stars 35 forks source link

Bundle scripts with pages/posts (isomorphic style) #16

Closed bebraw closed 7 years ago

bebraw commented 9 years ago

We'll want to use lazy loading (see https://github.com/rackt/react-router/tree/master/examples/partial-app-loading) here. Ie. we generate an index and a fragment for each page. Index will work as an entry point. After a client hits an index initially, it will consume those fragments after that. Thanks to Webpack's magic, we should get the needed bundles quite easily.

skipjack commented 8 years ago

Is there a recommended way/workaround to include scripts currently?

bebraw commented 8 years ago

Not yet. I have to rework the way it handles page templates. I've been a bit busy with client work lately.

bebraw commented 7 years ago

Given there's <Interactive> now, closing this. It's not isomorphic, but still enough for tons of cases. If we want true isomorphism, that would need a different approach (and bigger bundles).