import-map-overrides
import-map-overrides copied to clipboard
jsdelivr request when devtools are available
Hi, I'm seeing some really strange behavior that I cannot seem to figure out.
I moved away from jsdelivr
and host some scripts myself. Among them are regenerator-runtime.0.14.1.min.js
, import-map-overrides.3.1.1.js
, systemjs.6.15.1.min.js
and single-spa.6.0.1.min.js
.
I use import map overwrites and activate them in the HTML with:
<import-map-overrides-full show-when-local-storage="devtools" dev-libs></import-map-overrides-full>
All scripts are loaded fine but as soon as this is active and I got import-map-overrides.3.1.1.js
,
it injects single-spa.dev.js
from jsdelivr
! How can i prevent this? Here is my systemjs import map and i'm clearly linking to my local CDN. DO you use like a fallback to jsdelivr? I couldn't find it anywhere in the scripts. How can I overwrite this?
<script type="systemjs-importmap" id="external-map">
{
"imports": {
...,
"react": "https://ga.system.jspm.io/npm:[email protected]/index.js",
"react-dom": "https://ga.system.jspm.io/npm:[email protected]/index.js",
"single-spa": "https://self-hosted/single-spa.6.0.1.min.js"
},
"scopes": {
"https://ga.system.jspm.io/": {
"@babel/runtime/helpers/esm/classCallCheck": "https://ga.system.jspm.io/npm:@babel/[email protected]/helpers/esm/classCallCheck.js",
"@babel/runtime/helpers/esm/createClass": "https://ga.system.jspm.io/npm:@babel/[email protected]/helpers/esm/createClass.js",
...
}
}
}
</script>
It also seems like it's injecting a second import map with the following content. I guess this is where it comes from but that doesn't exlain why it's from jsdelivr. And I just realized that also it's injecting an old react version. I'm on 18.3.1 already.
<script type="systemjs-importmap" id="import-map-overrides" data-is-importmap-override="">{
"imports": {
"react-dom": "https://ga.system.jspm.io/npm:[email protected]/index.js",
"single-spa": "https://cdn.jsdelivr.net/npm/[email protected]/lib/es2015/system/single-spa.dev.js",
"react": "https://ga.system.jspm.io/npm:[email protected]/index.js"
},
"scopes": {}
}</script>
Thanks for your help!