mirror of
https://bitbucket.org/Mattrixwv/mattrixwvreactcomponents.git
synced 2025-12-06 13:43:59 -05:00
57 lines
1.3 KiB
TypeScript
57 lines
1.3 KiB
TypeScript
import tailwindcss from "@tailwindcss/vite";
|
|
import { tanstackRouter } from "@tanstack/router-plugin/vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import { resolve } from "path";
|
|
import { defineConfig } from "vite";
|
|
import dts from "vite-plugin-dts";
|
|
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
plugins: [
|
|
tanstackRouter({
|
|
target: "react",
|
|
autoCodeSplitting: true
|
|
}),
|
|
react(),
|
|
tailwindcss(),
|
|
dts({
|
|
include: ["lib"],
|
|
tsconfigPath: "./tsconfig.lib.json"
|
|
})
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
"@": resolve(__dirname, "src"),
|
|
"$": resolve(__dirname, "lib"),
|
|
"#root": resolve(__dirname)
|
|
}
|
|
},
|
|
build: {
|
|
lib: {
|
|
entry: {
|
|
button: resolve(__dirname, "lib/component/button.ts"),
|
|
input: resolve(__dirname, "lib/component/input.ts"),
|
|
loading: resolve(__dirname, "lib/component/loading.ts"),
|
|
message: resolve(__dirname, "lib/component/message.ts"),
|
|
modal: resolve(__dirname, "lib/component/modal.ts"),
|
|
nav: resolve(__dirname, "lib/component/nav.ts"),
|
|
tab: resolve(__dirname, "lib/component/tab.ts"),
|
|
},
|
|
formats: [ "es" ],
|
|
name: "Mattrixwv Component Library"
|
|
},
|
|
rollupOptions: {
|
|
external: [
|
|
"clsx",
|
|
"react",
|
|
"react/jsx-runtime",
|
|
"tailwindcss",
|
|
"react-icons/bs",
|
|
"react-router-dom",
|
|
"@headlessui/react"
|
|
]
|
|
}
|
|
}
|
|
});
|