Skip to content

Commit

Permalink
fix(optimize-css-plugin): convert buffer to string
Browse files Browse the repository at this point in the history
  • Loading branch information
metonym committed Sep 18, 2024
1 parent 49e320b commit 9f83cdf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/plugins/OptimizeCssPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ class OptimizeCssPlugin {
const original_css = assets[id].source();
const optimized_css = createOptimizedCss({
...this.options,
source: original_css,
source: Buffer.isBuffer(original_css)
? original_css.toString()
: original_css,
ids,
});

Expand Down

0 comments on commit 9f83cdf

Please sign in to comment.