Questions about the /_nuxt/ javascript files locally

Viewed 146

I have some questions about the javascript files that SSR nuxt apps create.

Where does nuxt place these files locally? This file /_nuxt/pages/index.js appears to be dynamic -- does the nuxt.config.js build this file and the others from scratch on each page load? Is nuxt config using code splitting to determine what JS and CSS is necessary for each page?

<script src="/_nuxt/runtime.js" defer></script>
<script src="/_nuxt/pages/index.js" defer></script>
<script src="/_nuxt/commons/app.js" defer></script>
<script src="/_nuxt/vendors/app.js" defer></script>
<script src="/_nuxt/app.js" defer></script>
1 Answers

The dev server should store everything needed in .nuxt at the root of your project if I'm not mistaken.
Then HMR is doing all the job of linking to various scripts with the proper SHA.

And yeah, routes are code splitted and preloaded, among other stuff.

Related