Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

importmap support is broken in folders #113

Closed
brandonkal opened this issue Jul 22, 2020 · 5 comments
Closed

importmap support is broken in folders #113

brandonkal opened this issue Jul 22, 2020 · 5 comments
Labels
bug Something isn't working

Comments

@brandonkal
Copy link

brandonkal commented Jul 22, 2020

An example reproduction:

$ cat subproject/import_map.json
{
	"imports": {
		"mod": "./my-mod.ts"
	}
}
$ cat .vscode/settings.json
{
	"deno.enable": true,
	"deno.importmap": "./subproject/import_map.json"
}

$ cat subproject/example.ts
import * as mod from 'mod' // TS error
export const x = mod.action() // TS error

Using an absolute path in subproject/import_map.json fixes the VSCode errors. But I can't use absolute paths for obvious reasons. So it is clear the extension is acting as if the import_map.json file was in the workspace root where relative imports would not work.

So this needs to be fixed.

@brandonkal
Copy link
Author

And now I open my project back up and it doesn't even work with absolute paths...
This is just a mess.

@bartlomieju bartlomieju added the bug Something isn't working label Aug 4, 2020
@dicarne
Copy link

dicarne commented Aug 11, 2020

This work now:
.vscode/settings.json

{
    "deno.enable": true,
    "deno.import_map": "./import_map.json"
}

@lucacasonato
Copy link
Member

@brandonkal is this still the case?

@brandonkal
Copy link
Author

Yes.

@brandonkal brandonkal mentioned this issue Sep 8, 2020
10 tasks
@lucacasonato
Copy link
Member

This has been resolved in version 3.x of the extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants