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 GitHub
parent 280e5923ea
commit 243a481d8a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -530,7 +530,7 @@ export default defineNuxtConfig({
hooks: { hooks: {
'build:manifest': (manifest) => { 'build:manifest': (manifest) => {
// find the app entry, css list // 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) { if (css) {
// start from the end of the array and go to the beginning // start from the end of the array and go to the beginning
for (let i = css.length - 1; i >= 0; i--) { for (let i = css.length - 1; i >= 0; i--) {