From 8c640c3d94ba80cb01fac911f59d4e322238ab25 Mon Sep 17 00:00:00 2001 From: Tim Perry Date: Tue, 9 Jul 2024 16:05:38 +0200 Subject: [PATCH] WIP: Test skipping fonts --- automation/webpack.prod.ts | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/automation/webpack.prod.ts b/automation/webpack.prod.ts index c7c3ba00..75079e74 100644 --- a/automation/webpack.prod.ts +++ b/automation/webpack.prod.ts @@ -93,16 +93,20 @@ export default merge(common, { // issues? This helps protect against possible corruptions: const manifest = originalManifest.map((entry: any) => { console.log(entry.url); + if (entry.url.includes('woff2')) { + console.log('[Skipping]'); + return entry; + } + const asset = compilation.getAsset(entry.url); + const assetSource = asset.source.source(); + + entry.integrity = ssri.fromData( + assetSource instanceof ArrayBuffer + ? Buffer.from(assetSource) // Wasm! + : assetSource + ).toString(); - console.log('asset.source', asset.source.constructor.name); - console.log('asset.source.source()', asset.source.source.toString()); - // const assetSource = asset.source.source(); - // entry.integrity = ssri.fromData( - // assetSource instanceof ArrayBuffer - // ? Buffer.from(assetSource) // Wasm! - // : assetSource - // ).toString(); return entry; });