import_map.json doesn't work (but if i use deno.json all works fine)
i use jsr.json and import_map.json in my library
jsr.json -
{
"$schema": "https://jsr.io/schema/config-file.v1.json",
"name": "@gramio/keyboards",
"version": "0.3.1",
"exports": "./src/index.ts",
"publish": {
"include": [
"jsr.json",
"import_map.json",
"src",
"README.md",
"tsconfig.json"
]
}
}
import_map.json (about it) -
{
"imports": {
"@gramio/types": "jsr:@gramio/types@^7.3.4"
}
}
but my dependency is recognized as npm and not jsr
I try to use deno.json and all works fine with it
{
"name": "@gramio/keyboards",
"version": "0.3.1",
"exports": "./src/index.ts",
"publish": {
"include": [
"deno.json",
"import_map.json",
"src",
"README.md",
"tsconfig.json"
]
},
"imports": {
"@gramio/types": "jsr:@gramio/types@^7.3.4"
}
}
for publish i use bunx jsr publish
The documentation is not clear, but only deno.json and jsr.json are autodiscovered. You'll need to specify the import map within the jsr.json file (similar to deno.json) or add an "importMap" key like so:
{
"$schema": "https://jsr.io/schema/config-file.v1.json",
"name": "@gramio/keyboards",
"version": "0.3.1",
"exports": "./src/index.ts",
"importMap": "./import_map.json"
"publish": {
"include": [
"jsr.json",
"import_map.json",
"src",
"README.md",
"tsconfig.json"
]
}
}
The documentation is not clear, but only deno.json and jsr.json are autodiscovered. You'll need to specify the import map within the jsr.json file (similar to deno.json) or add an "importMap" key like so:
{ "$schema": "https://jsr.io/schema/config-file.v1.json", "name": "@gramio/keyboards", "version": "0.3.1", "exports": "./src/index.ts", "importMap": "./import_map.json" "publish": { "include": [ "jsr.json", "import_map.json", "src", "README.md", "tsconfig.json" ] } }
But in jsr.json schema neither imports nor importMap are described