Skip to content

Commit 8c640c3

Browse files
committed
WIP: Test skipping fonts
1 parent c64e8e5 commit 8c640c3

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

automation/webpack.prod.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,16 +93,20 @@ export default merge(common, {
9393
// issues? This helps protect against possible corruptions:
9494
const manifest = originalManifest.map((entry: any) => {
9595
console.log(entry.url);
96+
if (entry.url.includes('woff2')) {
97+
console.log('[Skipping]');
98+
return entry;
99+
}
100+
96101
const asset = compilation.getAsset(entry.url);
102+
const assetSource = asset.source.source();
103+
104+
entry.integrity = ssri.fromData(
105+
assetSource instanceof ArrayBuffer
106+
? Buffer.from(assetSource) // Wasm!
107+
: assetSource
108+
).toString();
97109

98-
console.log('asset.source', asset.source.constructor.name);
99-
console.log('asset.source.source()', asset.source.source.toString());
100-
// const assetSource = asset.source.source();
101-
// entry.integrity = ssri.fromData(
102-
// assetSource instanceof ArrayBuffer
103-
// ? Buffer.from(assetSource) // Wasm!
104-
// : assetSource
105-
// ).toString();
106110
return entry;
107111
});
108112

0 commit comments

Comments
 (0)