Skip to content

Commit

Permalink
feat: add additional direct path exports
Browse files Browse the repository at this point in the history
  • Loading branch information
theogravity committed Sep 16, 2024
1 parent 38913e5 commit e83e060
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
20 changes: 20 additions & 0 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,31 @@
"import": "./dist/esm/components/*/index.mjs",
"require": "./dist/cjs/components/*/index.cjs"
},
"./helpers/*": {
"types": "./dist/types/helpers/*/index.d.ts",
"import": "./dist/esm/helpers/*/index.mjs",
"require": "./dist/cjs/helpers/*/index.cjs"
},
"./hooks/*": {
"types": "./dist/types/hooks/*/index.d.ts",
"import": "./dist/esm/hooks/*/index.mjs",
"require": "./dist/cjs/hooks/*/index.cjs"
},
"./tailwind": {
"types": "./dist/types/tailwind.d.ts",
"import": "./dist/esm/tailwind.mjs",
"require": "./dist/cjs/tailwind.cjs"
},
"./theme": {
"types": "./dist/types/theme.d.ts",
"import": "./dist/esm/theme.mjs",
"require": "./dist/cjs/theme.cjs"
},
"./theme-store/*": {
"types": "./dist/types/theme-store/*/index.d.ts",
"import": "./dist/esm/theme-store/*/index.mjs",
"require": "./dist/cjs/theme-store/*/index.cjs"
},
"./package.json": "./package.json"
},
"main": "dist/cjs/index.cjs",
Expand Down
13 changes: 12 additions & 1 deletion packages/ui/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,18 @@ import { rollupPluginUseClient } from "rollup-plugin-use-client";
import packageJson from "./package.json";

const componentEntries = await glob("src/components/**/index.ts");
const entries = ["src/index.ts", "src/tailwind.ts", ...componentEntries];
const helperEntries = await glob("src/helpers/**/index.ts");
const hooksEntries = await glob("src/hooks/**/index.ts");
const themeStoreEntries = await glob("src/theme-store/**/index.ts");
const entries = [
"src/index.ts",
"src/tailwind.ts",
"src/theme.ts",
...helperEntries,
...hooksEntries,
...themeStoreEntries,
...componentEntries,
];
const external = [
"flowbite/plugin",
"react/jsx-runtime",
Expand Down

0 comments on commit e83e060

Please sign in to comment.