diff --git a/src/index.ts b/src/index.ts index e5ee700..fd43ac4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,14 +1,7 @@ -try { - require('@kitajs/html/register') -} 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' - -declare global { - /** The html factory namespace. */ - var Html: typeof import('./index') -} 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/**/*"] }