Skip to content

Commit

Permalink
chore: fix error when building with manifest enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
userquin committed Nov 29, 2024
1 parent 5a95112 commit 58553f8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ export function _generateBundle(ctx: PWAPluginContext, bundle?: OutputBundle) {
// @ts-expect-error: for Vite 3 support, Vite 4 has removed `isAsset` property
isAsset: true,
type: 'asset',
// vite 6 deprecation: replaced with names
name: undefined,
// fix vite 6 build with manifest enabled
names: [],
source: generateWebManifestFile(options),
fileName: options.manifestFilename,
}
Expand All @@ -56,7 +59,10 @@ export function _generateBundle(ctx: PWAPluginContext, bundle?: OutputBundle) {
// @ts-expect-error: for Vite 3 support, Vite 4 has removed `isAsset` property
isAsset: true,
type: 'asset',
// vite 6 deprecation: replaced with names
name: undefined,
// fix vite 6 build with manifest enabled
names: [],
source: generateSimpleSWRegister(options, false),
fileName: FILE_SW_REGISTER,
}
Expand Down

0 comments on commit 58553f8

Please sign in to comment.