diff --git a/packages/documentation/src/modules/App/App.tsx b/packages/documentation/src/modules/App/App.tsx index 1db9d695..17b9f426 100644 --- a/packages/documentation/src/modules/App/App.tsx +++ b/packages/documentation/src/modules/App/App.tsx @@ -1,3 +1,5 @@ +import "@versini/ui-components/dist/style.css"; + import * as UI from "@versini/ui-components"; import clsx from "clsx"; import { useEffect } from "react"; diff --git a/packages/ui-components/src/components/Button/Button.tsx b/packages/ui-components/src/components/Button/Button.tsx index 80e99731..f8ec42bb 100644 --- a/packages/ui-components/src/components/Button/Button.tsx +++ b/packages/ui-components/src/components/Button/Button.tsx @@ -1,5 +1,3 @@ -import "./button.css"; - import React from "react"; import type { ButtonProps } from "./ButtonTypes"; diff --git a/packages/ui-components/src/components/Button/ButtonIcon.tsx b/packages/ui-components/src/components/Button/ButtonIcon.tsx index 5636de59..5c103f5e 100644 --- a/packages/ui-components/src/components/Button/ButtonIcon.tsx +++ b/packages/ui-components/src/components/Button/ButtonIcon.tsx @@ -1,5 +1,3 @@ -import "./button.css"; - import React from "react"; import type { ButtonIconProps } from "./ButtonTypes"; diff --git a/packages/ui-components/src/components/Footer/Footer.tsx b/packages/ui-components/src/components/Footer/Footer.tsx index ff1e09b6..ff03a558 100644 --- a/packages/ui-components/src/components/Footer/Footer.tsx +++ b/packages/ui-components/src/components/Footer/Footer.tsx @@ -1,5 +1,3 @@ -import "./footer.css"; - import clsx from "clsx"; import type { FooterProps } from "./FooterTypes"; diff --git a/packages/ui-components/src/components/Footer/footer.css b/packages/ui-components/src/components/Footer/footer.css deleted file mode 100644 index b5c61c95..00000000 --- a/packages/ui-components/src/components/Footer/footer.css +++ /dev/null @@ -1,3 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; diff --git a/packages/ui-components/src/components/Button/button.css b/packages/ui-components/src/components/index.css similarity index 100% rename from packages/ui-components/src/components/Button/button.css rename to packages/ui-components/src/components/index.css diff --git a/packages/ui-components/src/components/index.ts b/packages/ui-components/src/components/index.ts index efe32d81..f8f86092 100644 --- a/packages/ui-components/src/components/index.ts +++ b/packages/ui-components/src/components/index.ts @@ -1,3 +1,5 @@ +import "./index.css"; + import { Button } from "./Button/Button"; import { ButtonIcon } from "./Button/ButtonIcon"; import { ButtonLink } from "./Button/ButtonLink"; diff --git a/packages/ui-components/vite.config.ts b/packages/ui-components/vite.config.ts index 218aacc2..98086178 100644 --- a/packages/ui-components/vite.config.ts +++ b/packages/ui-components/vite.config.ts @@ -1,11 +1,8 @@ -/// - import { resolve } from "node:path"; import fs from "fs-extra"; import { defineConfig } from "vite"; import dts from "vite-plugin-dts"; -import { libInjectCss } from "vite-plugin-lib-inject-css"; const packageJson = fs.readJSONSync("package.json"); @@ -38,9 +35,8 @@ export default defineConfig({ "react/jsx-runtime", "tailwindcss", ], - output: { - assetFileNames: "assets/[name][extname]", + assetFileNames: "style[extname]", entryFileNames: "[name].js", }, }, @@ -60,13 +56,5 @@ export default defineConfig({ exclude: ["**/__tests__/**/*"], rollupTypes: true, }), - libInjectCss({ - entry: { - index: "./src/components/index.ts", - Button: "./src/components/Button/Button.tsx", - ButtonIcon: "./src/components/Button/ButtonIcon.tsx", - Footer: "./src/components/Footer/Footer.tsx", - }, - }), ], }); diff --git a/packages/ui-components/vitest.config.ts b/packages/ui-components/vitest.config.ts index 318de68e..f09341f8 100644 --- a/packages/ui-components/vitest.config.ts +++ b/packages/ui-components/vitest.config.ts @@ -1,3 +1,5 @@ +/// + import { defineConfig, mergeConfig } from "vitest/config"; import viteConfig from "./vite.config";