Skip to content

Commit b240d18

Browse files
refactor: code
1 parent 25e1668 commit b240d18

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/index.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -344,13 +344,11 @@ class CssMinimizerPlugin {
344344
);
345345
}
346346

347-
const result = await Promise.all(scheduledTasks);
347+
await Promise.all(scheduledTasks);
348348

349349
if (initializedWorker) {
350350
await initializedWorker.end();
351351
}
352-
353-
return result;
354352
}
355353

356354
apply(compiler) {
@@ -365,8 +363,8 @@ class CssMinimizerPlugin {
365363
);
366364

367365
const data = serialize({
368-
terser: cssNanoPackageJson.version,
369-
terserOptions: this.options.terserOptions,
366+
cssNano: cssNanoPackageJson.version,
367+
cssNanoOptions: this.options.minimizerOptions,
370368
});
371369

372370
hooks.chunkHash.tap(pluginName, (chunk, hash) => {

test/__snapshots__/CssMinimizerPlugin.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ exports[`CssMinimizerPlugin should throw error from postcss: warning 1`] = `Arra
7070

7171
exports[`CssMinimizerPlugin should work and generate real content hash: assets 1`] = `
7272
Object {
73-
"entry.19e4764f9c1d9fe130e2.d83c1458800a0db8915f.0ffa7254aa159dde7994.css": "body{color:red}a{color:#00f}",
73+
"entry.19e4764f9c1d9fe130e2.3dfffe1d97062bbef93c.df22749557b2a56485d0.css": "body{color:red}a{color:#00f}",
7474
}
7575
`;
7676

0 commit comments

Comments
 (0)