Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: logic
  • Loading branch information
alexander-akait committed Dec 11, 2025
commit e30711391bb610967b8324684e45de8b283f4f15
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ class CssMinimizerPlugin {
innerSourceMap,
true,
);
} else if (typeof item.code !== "undefined") {
} else if (typeof item.code !== "undefined" && item.code !== null) {
output.source = new RawSource(item.code);
}
}
Expand Down
10 changes: 1 addition & 9 deletions test/__snapshots__/minify-option.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -510,15 +510,7 @@ exports[`"minify" option should work with "csso" minifier: warning 1`] = `[]`;

exports[`"minify" option should work with empty code: assets 1`] = `
{
"foo.css": "body {
color: red;
}
a {
color: blue;
}

/*# sourceMappingURL=foo.css.map*/",
"foo.css.map": "{"version":3,"file":"foo.css","mappings":"AAAA;EACE,UAAU;AACZ;AACA;EACE,WAAW;AACb,C","sources":["webpack:///./foo.css"],"sourcesContent":["body {\\n color: red;\\n}\\na {\\n color: blue;\\n}"],"names":[],"sourceRoot":""}",
"foo.css": "",
}
`;

Expand Down