Static GitHub Issues

[2601] Remove nuxtServerInit code from client-side app bundle

prev: How to remove client side nuxt scripts?
next: Duplicate layout when happen some error

Hello,

I just have noticed that the code used in the nuxtServerInit method is added to the app.js bundle.

I think that it should be removed from the client, since the code is always executed server-side.

Plus, I think that nuxtServerInit method would be the perfect place to call external APIs that might be secured via api-keys to load initial Data, in this case we don't want the api-keys to be available client-side.

Thank you for considering this.

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c2263">#c2263</a>)</em></sub></div>