Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Commit 5bf164d

Browse files
committed
Add safety check to ensure chunk is defined
1 parent cfb5ef1 commit 5bf164d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/core/create_compilers/RollupCompiler.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,10 @@ const find_css = (chunk: RenderedChunk, bundle: OutputBundle) => {
7979
if (file.endsWith('.css')) {
8080
css_files.add(file);
8181
} else {
82-
recurse(<OutputChunk>bundle[file]);
82+
const imported_chunk = <OutputChunk>bundle[file];
83+
if (imported_chunk) {
84+
recurse(imported_chunk);
85+
}
8386
}
8487
});
8588
}

0 commit comments

Comments
 (0)