Gatsby: Static website without JS bundle?

Created on 27 May 2018  路  2Comments  路  Source: gatsbyjs/gatsby

Is there any way to generate a website that has no need to build the JS or add a bundle to the page? I really like React as a templating language and the tooling that Gatsby has created around it, but don't actually want to load React or anything else on the frontend.

https://github.com/gatsbyjs/gatsby/issues/962 touched upon this a year ago, but the answer there was, to me, unsatisfactory because flipkart, the example used to describe how PWAs are better, is a full fledged online store whereas most Gatsby projects are much simpler.

question or discussion

Most helpful comment

@pieh thanks!

It's not a big deal for me as my pages are smaller than the JS bundle that would enable that functionality 馃槢

All 2 comments

You could edit edit html.js ( https://www.gatsbyjs.org/docs/custom-html/ ) to not include js assets in head (would still get generated), but you would a lot of functionality like page prefetching and in-browser navigation, lazy image loading, etc.

@pieh thanks!

It's not a big deal for me as my pages are smaller than the JS bundle that would enable that functionality 馃槢

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jimfilippou picture jimfilippou  路  3Comments

benstr picture benstr  路  3Comments

dustinhorton picture dustinhorton  路  3Comments

signalwerk picture signalwerk  路  3Comments

andykais picture andykais  路  3Comments