Home

Issue: 2601

Remove nuxtServerInit code from client-side app bundle

[issue link]

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.

This question is available on Nuxt.js community (#c2263)