-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Labels
Needs DiscussionNeeds DiscussionNeeds Discussion
Description
👋 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.
Metadata
Metadata
Assignees
Labels
Needs DiscussionNeeds DiscussionNeeds Discussion