From 721f39a1a431b440ee9acc8b1a36dead51db5fbe Mon Sep 17 00:00:00 2001 From: daichi1998928 Date: Sat, 31 May 2025 23:18:08 +0900 Subject: [PATCH] config: add allowImportingTsExtensions and noEmit to tsconfig --- packages/ui/theme/index.ts | 4 ++-- packages/ui/theme/uno.config.ts | 2 +- packages/ui/uno.config.ts | 2 +- tsconfig.json | 2 ++ uno.config.ts | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/ui/theme/index.ts b/packages/ui/theme/index.ts index 192854dec..feffcfac2 100644 --- a/packages/ui/theme/index.ts +++ b/packages/ui/theme/index.ts @@ -1,2 +1,2 @@ -export * from './theme' -export * from './uno.config' +export * from './theme.ts' +export * from './uno.config.ts' diff --git a/packages/ui/theme/uno.config.ts b/packages/ui/theme/uno.config.ts index 80fee22a0..f807d89ed 100644 --- a/packages/ui/theme/uno.config.ts +++ b/packages/ui/theme/uno.config.ts @@ -5,7 +5,7 @@ import { transformerDirectives, transformerVariantGroup, } from 'unocss' -import { theme } from './theme' +import { theme } from './theme.ts' export const unoConfig = { presets: [ diff --git a/packages/ui/uno.config.ts b/packages/ui/uno.config.ts index bc205a416..dd792ec87 100644 --- a/packages/ui/uno.config.ts +++ b/packages/ui/uno.config.ts @@ -1,4 +1,4 @@ import { defineConfig } from 'unocss' -import { unoConfig } from './theme' +import { unoConfig } from './theme/index.ts' export default defineConfig(unoConfig) diff --git a/tsconfig.json b/tsconfig.json index a065ab49b..175057a5c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -19,10 +19,12 @@ "vite/client", "vitest/globals" ], + "allowImportingTsExtensions": true, "allowJs": true, "strict": true, "strictNullChecks": true, "noImplicitAny": false, + "noEmit": true, // We use tsup/vite instead of tsc to build the package, so we don't need to care about this option. // Add outDir option to avoid tsconfig error in monorepo. "outDir": "dist", diff --git a/uno.config.ts b/uno.config.ts index 27249b1af..04ae48b97 100644 --- a/uno.config.ts +++ b/uno.config.ts @@ -1,6 +1,6 @@ import { defineConfig } from 'unocss' -import config from './packages/client/uno.config' +import config from './packages/client/uno.config.ts' export default defineConfig({ ...config,