{vite 'src/main.js'} writes the tags that load an entry of a Vite build. In
production it reads the manifest Vite writes - www/<app>/build/.vite/manifest.json
(build.manifest: true, build.outDir that directory) - and gives per
entry a <link rel="stylesheet"> for its CSS and the CSS of every chunk it
imports, a <link rel="modulepreload"> for every such chunk, and its
<script type="module">. A dynamic import is left to load when asked for. The
addresses are made of $padRoot, the application and $padViteBuild
(default build), which is the build's base.
While the dev server runs - $padViteDev names it, or the file hot
in the build directory holds its address - the tags point at the dev server instead:
@vite/client first, then the sources as they are, for hot module replacement. The
react option adds the fast-refresh preamble the React plugin needs in that mode.
A file goes out once a page, however many {vite} tags name it, and a script
carries the request's nonce when $padCsp asks for one. A {vite}
without an entry, an entry the manifest does not have, and a build without a manifest while no
dev server runs are errors. The output depends on a build, so the examples are shown rather than
run; the islands application uses it for real. For a plain file of www/, use
{asset}.