htmx-router 2.1.4 → 2.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/internal/client.js +0 -2
- package/dist/internal/component/scripts.js +3 -1
- package/package.json +1 -1
- package/global.d.ts +0 -26
package/dist/internal/client.js
CHANGED
|
@@ -2,8 +2,6 @@ import { ServerOnlyWarning } from "./util.js";
|
|
|
2
2
|
ServerOnlyWarning("client-url");
|
|
3
3
|
import { readFile } from "fs/promises";
|
|
4
4
|
export async function GetClientEntryURL() {
|
|
5
|
-
if (import.meta.env.DEV)
|
|
6
|
-
return "/app/entry.client.ts";
|
|
7
5
|
const config = JSON.parse(await readFile("./dist/client/.vite/manifest.json", "utf8"));
|
|
8
6
|
for (const key in config) {
|
|
9
7
|
const def = config[key];
|
|
@@ -3,7 +3,9 @@ import { GetMountUrl } from 'htmx-router/internal/mount';
|
|
|
3
3
|
import { GetSheetUrl } from 'htmx-router/css';
|
|
4
4
|
|
|
5
5
|
let cache: JSX.Element | null = null;
|
|
6
|
-
const clientEntry =
|
|
6
|
+
const clientEntry = import.meta.env.DEV
|
|
7
|
+
? "/app/entry.client.ts"
|
|
8
|
+
: await GetClientEntryURL();
|
|
7
9
|
export function Scripts() {
|
|
8
10
|
if (cache) return cache;
|
|
9
11
|
|
package/package.json
CHANGED
package/global.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
declare namespace JSX {
|
|
2
|
-
interface Element {}
|
|
3
|
-
interface IntrinsicElements {
|
|
4
|
-
[elementName: string]: any;
|
|
5
|
-
}
|
|
6
|
-
interface Fragment {}
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
interface ImportMeta {
|
|
10
|
-
glob: (
|
|
11
|
-
pattern: string,
|
|
12
|
-
options?: {
|
|
13
|
-
eager?: boolean;
|
|
14
|
-
import?: string;
|
|
15
|
-
as?: string;
|
|
16
|
-
}
|
|
17
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
18
|
-
) => Record<string, any>;
|
|
19
|
-
env: {
|
|
20
|
-
BASE_URL: string,
|
|
21
|
-
DEV: boolean,
|
|
22
|
-
MODE: string,
|
|
23
|
-
PROD: boolean,
|
|
24
|
-
SSR: true,
|
|
25
|
-
} & Record<`VITE_${string}`, string>
|
|
26
|
-
}
|