Skip to content

Commit

Permalink
fix: avoid packageJson without name in resolveLibCssFilename
Browse files Browse the repository at this point in the history
  • Loading branch information
Jinjiang authored Jan 31, 2025
1 parent f19ffbc commit ae06721
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/plugins/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3463,7 +3463,7 @@ export function resolveLibCssFilename(
}

const packageJson = findNearestPackageData(root, packageCache)?.data
const name = packageJson ? getPkgName(packageJson.name) : undefined
const name = (packageJson && packageJson.name) ? getPkgName(packageJson.name) : undefined

if (!name)
throw new Error(
Expand Down

0 comments on commit ae06721

Please sign in to comment.