Skip to content

Commit 582366c

Browse files
committed
Inline esm.sh URLs in widget.js
The changes in #193 replaced inline esm.sh URLs with bare specifiers and added a deno.json import map to silence a lint error. But the widget runs in the browser, not Deno, so the import map is never used at runtime and the bare specifiers will fail to resolve. This reverts to inline URL imports and instead excludes the `no-import-prefix` lint rule, which only applies to Deno runtime conventions (`npm:`/`jsr:` prefixes) not browser code.
1 parent 650809c commit 582366c

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

deno.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
{
22
"lock": false,
3-
"imports": {
4-
"higlass": "https://esm.sh/higlass@1.13?deps=react@17,react-dom@17,pixi.js@6",
5-
"@lukeed/uuid": "https://esm.sh/@lukeed/uuid@2.0.1"
6-
},
73
"compilerOptions": {
84
"checkJs": true,
95
"lib": ["dom", "dom.iterable", "esnext"]
106
},
117
"lint": {
128
"rules": {
13-
"exclude": ["prefer-const", "no-window"]
9+
"exclude": ["prefer-const", "no-window", "no-import-prefix"]
1410
}
1511
},
1612
"fmt": {

src/higlass/widget.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import * as hglib from "higlass";
2-
import { v4 } from "@lukeed/uuid";
1+
import * as hglib from "https://esm.sh/higlass@1.13?deps=react@17,react-dom@17,pixi.js@6";
2+
import { v4 } from "https://esm.sh/@lukeed/uuid@2.0.1";
33

4-
/** @import { HGC, PluginDataFetcherConstructor, GenomicLocation, Viewconf, DataFetcher} from "./types.ts" */
4+
/** @import { PluginDataFetcherConstructor, GenomicLocation, Viewconf, DataFetcher} from "./types.ts" */
55

66
const NAME = "jupyter";
77

0 commit comments

Comments
 (0)