Skip to content

Commit ad6e714

Browse files
Update packages/vite/src/node/plugins/asset.ts
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
1 parent 4e1329d commit ad6e714

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/vite/src/node/plugins/asset.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ export function assetPlugin(config: ResolvedConfig): Plugin {
271271
// Remove CSS and assets that were not imported by any chunk
272272
for (const file in bundle) {
273273
const chunk = bundle[file]
274-
if (chunk.type === 'asset' && importedCssAssets) {
274+
if (chunk.type === 'asset' && importedCssAssets.size > 0) {
275275
if (!importedCssAssets.has(cleanUrl(chunk.fileName))) {
276276
delete bundle[file]
277277
}

0 commit comments

Comments
 (0)