Skip to content

Commit

Permalink
Support fetch priority with import maps (#2477)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikt9 committed Jan 7, 2024
1 parent 3400f59 commit 3a5f73f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/features/import-maps.js
Expand Up @@ -50,7 +50,7 @@ function processScripts () {
else if (script.type === 'systemjs-importmap') {
script.sp = true;
// The passThrough property is for letting the module types fetch implementation know that this is not a SystemJS module.
var fetchPromise = script.src ? (System.fetch || fetch)(script.src, { integrity: script.integrity, passThrough: true }).then(function (res) {
var fetchPromise = script.src ? (System.fetch || fetch)(script.src, { integrity: script.integrity, priority: script.fetchPriority, passThrough: true }).then(function (res) {
if (!res.ok)
throw Error(process.env.SYSTEM_PRODUCTION ? res.status : 'Invalid status code: ' + res.status);
return res.text();
Expand Down

0 comments on commit 3a5f73f

Please sign in to comment.