Skip to content

Commit

Permalink
Remove preload polyfill cruft
Browse files Browse the repository at this point in the history
  • Loading branch information
papandreou committed Sep 1, 2021
1 parent 4ca7031 commit 9bfd566
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions lib/subfont.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,23 +247,6 @@ module.exports = async function subfont(
relation.omitFunctionCall();
}

// Compress inserted javascript
const preloadPolyfillScripts = assetGraph.findRelations({
type: 'HtmlScript',
to: {
isInline: true,
outgoingRelations: (relation) => relation.type === 'JavaScriptStaticUrl',
},
});
await assetGraph.compressJavaScript({
type: 'JavaScript',
isLoaded: true,
outgoingRelations: (relation) => relation.type === 'JavaScriptStaticUrl',
});
for (const relation of preloadPolyfillScripts) {
relation.inline();
}

for (const asset of assetGraph.findAssets({
isDirty: true,
isInline: false,
Expand Down

0 comments on commit 9bfd566

Please sign in to comment.