diff --git a/packages/components/package.json b/packages/components/package.json index 5d248cb3a..906d461a5 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -26,8 +26,7 @@ "./TextArea": "./dist/TextArea.js", "./TextField": "./dist/TextField.js", "./Tooltip": "./dist/Tooltip.js", - "./style": "./dist/style.css", - "./style/init": "./dist/index.js" + "./styles": "./dist/styles.css" }, "files": [ "dist" diff --git a/packages/components/vite.build.config.ts b/packages/components/vite.build.config.ts index fe71c888d..2a2856ce3 100644 --- a/packages/components/vite.build.config.ts +++ b/packages/components/vite.build.config.ts @@ -16,7 +16,6 @@ export default defineConfig( entry: { Avatar: "./src/components/Avatar/index.ts", Badge: "./src/components/Badge/index.ts", - Breadcrumb: "./src/components/Breadcrumb/index.ts", Button: "./src/components/Button/index.ts", Checkbox: "./src/components/Checkbox/index.ts", Content: "./src/components/Content/index.ts", @@ -46,6 +45,14 @@ export default defineConfig( formats: ["es"], }, rollupOptions: { + output: { + assetFileNames: (assetInfo: { name: string }) => { + if (assetInfo.name === "style.css") { + return "styles.css"; + } + return assetInfo.name; + }, + }, external: [ "react", "react-dom", diff --git a/packages/stylesheet/build.js b/packages/stylesheet/build.js index 04a3e93d7..c104fe2b2 100644 --- a/packages/stylesheet/build.js +++ b/packages/stylesheet/build.js @@ -4,12 +4,12 @@ import * as path from "path"; import { createRequire } from "module"; const stylesheetPathname = createRequire(import.meta.url).resolve( - "@mittwald/flow-next-components/style", + "@mittwald/flow-next-components/styles", ); const thisDirname = path.dirname(url.fileURLToPath(import.meta.url)); -const targetPathname = path.join(thisDirname, "dist/style.css"); +const targetPathname = path.join(thisDirname, "dist/styles.css"); if (!fs.existsSync(path.dirname(targetPathname))) { fs.mkdirSync(path.dirname(targetPathname));