Skip to content

Commit

Permalink
fix(ui): #1732: fix tailwind config export
Browse files Browse the repository at this point in the history
  • Loading branch information
VanishMax committed Aug 29, 2024
1 parent ab7a56b commit 91cbffd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
5 changes: 0 additions & 5 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,13 @@
"./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",
"./*": "./src/*/index.tsx"
},
"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"
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 2 additions & 5 deletions packages/ui/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, string> => {
const getUIEntries = (): Record<string, string> => {
const source = resolve(__dirname, 'src');
const dirs = readdirSync(source, { withFileTypes: true });

Expand Down Expand Up @@ -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',
},
Expand Down

0 comments on commit 91cbffd

Please sign in to comment.