From 1704a2c6d219b297e7c454ba35d6eaa526b6f15c Mon Sep 17 00:00:00 2001 From: Arthur Fiorette Date: Sat, 7 Oct 2023 16:28:46 -0300 Subject: [PATCH 1/3] fix --- src/index.ts | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/index.ts b/src/index.ts index 1342838..fd43ac4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,14 +1,7 @@ -// Adds @kitajs/html's Html globally. -// @ts-expect-error - When running from a compiled bun version, -// this will fail because /register will be stripped out if not -// used. This is just a workaround to make it work. -import { noop } from '@kitajs/html/register' -try { - noop() -} catch {} - export * from './html' export * from './options' export * from './utils' +// Adds @kitajs/html's Html globally. +export * from '@kitajs/html/register' export { Html } from '@kitajs/html' From 4238c0ce8a3246a520253bf717b29f46759e4bff Mon Sep 17 00:00:00 2001 From: Arthur Fiorette Date: Sat, 7 Oct 2023 16:32:19 -0300 Subject: [PATCH 2/3] fix build --- tsconfig.cjs.json | 3 ++- tsconfig.esm.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tsconfig.cjs.json b/tsconfig.cjs.json index 3dc2586..c5359cb 100644 --- a/tsconfig.cjs.json +++ b/tsconfig.cjs.json @@ -3,7 +3,8 @@ "compilerOptions": { "target": "ES2022", "module": "CommonJS", - "outDir": "./dist/cjs" + "outDir": "./dist/cjs", + "noEmit": false }, "include": ["src/**/*"] } diff --git a/tsconfig.esm.json b/tsconfig.esm.json index e7a0053..e7e0c90 100644 --- a/tsconfig.esm.json +++ b/tsconfig.esm.json @@ -3,7 +3,8 @@ "compilerOptions": { "target": "ES2021", "module": "ES2022", - "outDir": "./dist" + "outDir": "./dist", + "noEmit": false }, "include": ["src/**/*"] } From 497d6a4f6e652ddc6fac7899e9fbc37284587182 Mon Sep 17 00:00:00 2001 From: Arthur Fiorette Date: Sat, 7 Oct 2023 16:36:38 -0300 Subject: [PATCH 3/3] global var --- src/index.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/index.ts b/src/index.ts index ff84379..fd43ac4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,8 +5,3 @@ export * from './utils' // Adds @kitajs/html's Html globally. export * from '@kitajs/html/register' export { Html } from '@kitajs/html' - -declare global { - /** The html factory namespace. */ - var Html: typeof import('./index') -}