Skip to content

Commit 1df8aea

Browse files
refactor: drop webpack@4
1 parent 6ed313e commit 1df8aea

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ class HtmlMinimizerPlugin {
177177
return;
178178
}
179179

180-
output.source = new RawSource(output.html);
180+
output.source = new RawSource(output.code);
181181

182182
await cacheItem.storePromise({
183183
source: output.source,

src/minify.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const minify = async (options) => {
2626
const result = await minifyFn({ [assetName]: input }, minimizerOptions);
2727

2828
return {
29-
html: result,
29+
code: result,
3030
};
3131
}
3232

@@ -36,7 +36,7 @@ const minify = async (options) => {
3636
});
3737

3838
return {
39-
html: result,
39+
code: result,
4040
};
4141
};
4242

test/worker.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ describe('worker', () => {
1111
input: '<!-- Comment --><p title="blah" id="moo"> foo </p>',
1212
minimizerOptions: { removeComments: false },
1313
};
14-
const { html } = await transform(serialize(options));
14+
const { code } = await transform(serialize(options));
1515

16-
expect(html).toMatchSnapshot('html');
16+
expect(code).toMatchSnapshot('html');
1717
});
1818

1919
it('should minify html', async () => {
@@ -28,9 +28,9 @@ describe('worker', () => {
2828
};
2929
},
3030
};
31-
const { html } = await transform(serialize(options));
31+
const { code } = await transform(serialize(options));
3232

33-
expect(html).toMatchSnapshot('html');
33+
expect(code).toMatchSnapshot('html');
3434
});
3535

3636
it('should emit error', async () => {

0 commit comments

Comments
 (0)