Skip to content

Commit 016bf04

Browse files
authored
Merge pull request #34 from laravel/fix-missing-file
[0.x] Ensure manifest always contains a file key for CSS sources
2 parents c1bac96 + c0442a0 commit 016bf04

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ export default function laravel(config: string|string[]|PluginConfig): LaravelPl
169169
cssManifest[relativeChunkPath] = {
170170
/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */
171171
/* @ts-ignore */
172-
file: Array.from(chunk.viteMetadata.importedCss)[0],
172+
file: Array.from(chunk.viteMetadata.importedCss)[0] ?? chunk.fileName,
173173
src: relativeChunkPath,
174174
isEntry: true,
175175
}

0 commit comments

Comments
 (0)