Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(css): ensure code is valid after empty css chunk imports are removed
Make sure that minified code that chains `require` calls with the `,` operator will not result in invalid code when removing one of the chained requires. Previously the last require that terminates with a semicolon was removed with the semicolon. This produced invalid code like `require(), /* empty css */const foo =` Now we append either a comma if a next require call was chained, like `require(...), require(css), other` --> `require(...)/* empty css */, other` Or terminate with a semicolon `require(...), require(css); const foo = ...` --> `require(...)/* empty css */; const foo = ...` Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
- Loading branch information