Fix missing file extension on sub URL imports
This commit is contained in:
parent
5106424a32
commit
04f82b655b
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hibas123/jrpcgen",
|
"name": "@hibas123/jrpcgen",
|
||||||
"version": "1.2.11",
|
"version": "1.2.12",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"packageManager": "yarn@3.1.1",
|
"packageManager": "yarn@3.1.1",
|
||||||
|
@ -53,6 +53,9 @@ function resolve(base: string, sub?: string) {
|
|||||||
} else if (base.startsWith("http://") || base.startsWith("https://")) {
|
} else if (base.startsWith("http://") || base.startsWith("https://")) {
|
||||||
let u = new URL(base);
|
let u = new URL(base);
|
||||||
if (sub) {
|
if (sub) {
|
||||||
|
if (!sub.endsWith(".jrpc")) {
|
||||||
|
sub += ".jrpc";
|
||||||
|
}
|
||||||
u = new URL(sub, u);
|
u = new URL(sub, u);
|
||||||
}
|
}
|
||||||
return u.href;
|
return u.href;
|
||||||
|
Loading…
Reference in New Issue
Block a user