Skip to content

Commit

Permalink
WIP: Test skipping fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
pimterry committed Jul 9, 2024
1 parent c64e8e5 commit 8c640c3
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions automation/webpack.prod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});

Expand Down

0 comments on commit 8c640c3

Please sign in to comment.