diff --git a/packages/ui/package.json b/packages/ui/package.json index 59dfa194be..843254327a 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -30,7 +30,6 @@ "./lib/toast/*": "./lib/toast/*.ts", "./lib/toast/transaction-toast": "./lib/toast/transaction-toast.tsx", "./lib/utils": "./lib/utils.ts", - "./tailwind": "./src/tailwindConfig.ts", "./postcss.config.js": "./postcss.config.js", "./styles/*": "./styles/*", "./hooks/*": "./src/hooks/*/index.ts", @@ -38,10 +37,6 @@ }, "publishConfig": { "exports": { - "./tailwind": { - "types": "./dist/src/tailwindConfig.d.ts", - "default": "./dist/src/tailwindConfig.js" - }, "./*": { "types": "./dist/src/*/index.d.ts", "default": "./dist/src/*/index.js" diff --git a/packages/ui/src/tailwindConfig.ts b/packages/ui/src/tailwind/index.tsx similarity index 92% rename from packages/ui/src/tailwindConfig.ts rename to packages/ui/src/tailwind/index.tsx index 84dfbbb491..8175f4efd4 100644 --- a/packages/ui/src/tailwindConfig.ts +++ b/packages/ui/src/tailwind/index.tsx @@ -1,4 +1,4 @@ -import { theme } from './PenumbraUIProvider/theme'; +import { theme } from '../PenumbraUIProvider/theme.ts'; /** * For consumers using Tailwind, this file exports a Tailwind config based on diff --git a/packages/ui/vite.config.ts b/packages/ui/vite.config.ts index 8e7d77cfd8..39e91f8740 100644 --- a/packages/ui/vite.config.ts +++ b/packages/ui/vite.config.ts @@ -9,7 +9,7 @@ import { exec } from 'child_process'; * their initial paths, e.g. `{ 'src/Button/index': 'src/Button/index.tsx' }`. * This way, Vite can build each component separately while extracting shared code * */ -const getAllUIComponents = (): Record => { +const getUIEntries = (): Record => { const source = resolve(__dirname, 'src'); const dirs = readdirSync(source, { withFileTypes: true }); @@ -43,10 +43,7 @@ export default defineConfig({ build: { emptyOutDir: true, lib: { - entry: { - 'src/tailwindConfig': join(__dirname, 'src', 'tailwindConfig.ts'), - ...getAllUIComponents(), - }, + entry: getUIEntries(), formats: ['es'], name: '@penumbra-zone/ui', },