From 3a5f73fad6c9c33f05713019aaa3afef11fdf451 Mon Sep 17 00:00:00 2001 From: Erik Tribou <49534735+erikt9@users.noreply.github.com> Date: Sun, 7 Jan 2024 08:41:55 -0800 Subject: [PATCH] Support fetch priority with import maps (#2477) --- src/features/import-maps.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/features/import-maps.js b/src/features/import-maps.js index 92154692..3d6a66e2 100644 --- a/src/features/import-maps.js +++ b/src/features/import-maps.js @@ -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();