diff --git a/src/plugins/OptimizeCssPlugin.ts b/src/plugins/OptimizeCssPlugin.ts index 6e279ef..1dd1e48 100644 --- a/src/plugins/OptimizeCssPlugin.ts +++ b/src/plugins/OptimizeCssPlugin.ts @@ -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, });