docs: ensure manifest code snippet works with pnpm (#29273)

This commit is contained in:
Domenik Reitzner 2024-10-08 15:27:24 +02:00 committed by Daniel Roe
parent cb6cd82b8c
commit 92b427ce81
No known key found for this signature in database
GPG Key ID: CBC814C393D93268

View File

@ -530,7 +530,7 @@ export default defineNuxtConfig({
hooks: {
'build:manifest': (manifest) => {
// find the app entry, css list
const css = manifest['node_modules/nuxt/dist/app/entry.js']?.css
const css = Object.values(manifest).find(options => options.isEntry)?.css
if (css) {
// start from the end of the array and go to the beginning
for (let i = css.length - 1; i >= 0; i--) {