👋 Hello!
I'd like to be able to set up an import map to a 'local' file (local to the playground, that is - meaning a file that the playground includes)
Consider:
{
"files": {
"index.html": {
"content": "<script type=\"module\" src=\"script.js\"></script>"
},
"script.js": {
"content": "import '@x/y/z';"
},
"xyz.js": {
"content": "console.log('hidy-ho');",
"hidden": true
}
},
"importMap": {
"imports": {
"@x/y/z": "xyz.js"
}
}
}
In this example config, I'm attempting to alias the bare module specifier @x/y/z.
I expect to see 'hidy-ho' logged to the console
I actually see this:
Import map key "@x/y/z" is invalid because address "xyz.js" is not a valid URL. playground-project.js:139:17
Same results for ./xyz.js as the import target.
👋 Hello!
I'd like to be able to set up an import map to a 'local' file (local to the playground, that is - meaning a file that the playground includes)
Consider:
{ "files": { "index.html": { "content": "<script type=\"module\" src=\"script.js\"></script>" }, "script.js": { "content": "import '@x/y/z';" }, "xyz.js": { "content": "console.log('hidy-ho');", "hidden": true } }, "importMap": { "imports": { "@x/y/z": "xyz.js" } } }In this example config, I'm attempting to alias the bare module specifier
@x/y/z.I expect to see 'hidy-ho' logged to the console
I actually see this:
Same results for
./xyz.jsas the import target.