Skip to content

Commit

Permalink
feat(optimizer): Support bun lockfile format (#10288)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudBarre committed Sep 29, 2022
1 parent fb8ab16 commit 931d69b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/vite/src/node/optimizer/index.ts
Expand Up @@ -1042,7 +1042,12 @@ function isSingleDefaultExport(exports: readonly string[]) {
return exports.length === 1 && exports[0] === 'default'
}

const lockfileFormats = ['package-lock.json', 'yarn.lock', 'pnpm-lock.yaml']
const lockfileFormats = [
'package-lock.json',
'yarn.lock',
'pnpm-lock.yaml',
'bun.lockb'
]

export function getDepHash(config: ResolvedConfig, ssr: boolean): string {
let content = lookupFile(config.root, lockfileFormats) || ''
Expand Down

0 comments on commit 931d69b

Please sign in to comment.