Skip to content

Commit

Permalink
Reflect changes to manifest.json in migration.md
Browse files Browse the repository at this point in the history
Related: vitejs#14945
Fixes: vitejs#15161
  • Loading branch information
helhum committed Nov 27, 2023
1 parent ef403c0 commit 7048356
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/guide/migration.md
Expand Up @@ -134,6 +134,14 @@ In Vite 4, the manifest files ([`build.manifest`](/config/build-options.md#build

From Vite 5, they will be generated in the `.vite` directory in the `build.outDir` by default. This change helps deconflict public files with the same manifest file names when they are copied to the `build.outDir`.

### Corresponding CSS files are not listed as top level entry in manifest.json file

In Vite 4, the corresponding CSS file for a JavaScript entry point was also listed as top level entry in the manifest.json file.

In Vite 5, corresponding CSS files can only be found within the JavaScript entry file section.
When injecting the JS file, the corresponding CSS files [should be injected](https://vitejs.dev/guide/backend-integration.html#:~:text=%3C!%2D%2D%20if%20production%20%2D%2D%3E%0A%3Clink%20rel%3D%22stylesheet%22%20href%3D%22/assets/%7B%7B%20manifest%5B%27main.js%27%5D.css%20%7D%7D%22%20/%3E%0A%3Cscript%20type%3D%22module%22%20src%3D%22/assets/%7B%7B%20manifest%5B%27main.js%27%5D.file%20%7D%7D%22%3E%3C/script%3E).
When the CSS should be injected separately, it must be added as separate entry point.

### CLI shortcuts require an additional `Enter` press

CLI shortcuts, like `r` to restart the dev server, now require an additional `Enter` press to trigger the shortcut. For example, `r + Enter` to restart the dev server.
Expand Down

0 comments on commit 7048356

Please sign in to comment.