Closed
Description
Hi,
during an upgrade to vite 6 i encountered an issue where vite build
fails
when letting vite create a manifest.json with the manifest build option while VitePWA is in the plugins array.
error during build:
[vite:manifest] Cannot read properties of undefined (reading 'length')
at Object.generateBundle (file:///home/projects/vitejs-vite-bj1cha/node_modules/vite/dist/node/chunks/dep-C6qYk3zB.js:13637:58)
at Object.handler (file:///home/projects/vitejs-vite-bj1cha/node_modules/vite/dist/node/chunks/dep-C6qYk3zB.js:50896:15)
at eval (file:///home/projects/vitejs-vite-bj1cha/node_modules/rollup/dist/es/shared/node-entry.js:20837:40)
at https://vitejsvitebj1cha-1c10.w-credentialless-staticblitz.com/blitz.88b6dd69.js:40:23076
Here is a quick repro for the issue:
https://stackblitz.com/edit/vitejs-vite-bj1cha?file=vite.config.js
Removing VitePWA from the plugin array or not letting vite create a manifest.json will make vite build
succeed.
Not sure if there is something to be done on your side or if this is an issue upstream at vite.
In case this has to be fixed upstream please leave a quick comment so i can open this issue at vitejs/vite.
This issue is reproducible with v0.21.0 and PR 786.
Kind regards
martyluky
Metadata
Metadata
Assignees
Labels
No labels