35 lines
953 B
TypeScript
35 lines
953 B
TypeScript
import { defineConfig } from "vite";
|
|
import vue from "@vitejs/plugin-vue";
|
|
import tailwindcss from "@tailwindcss/vite";
|
|
import { fileURLToPath, URL } from "node:url";
|
|
export default defineConfig(({ command }) => ({
|
|
plugins: [vue(), tailwindcss()],
|
|
resolve: {
|
|
alias: [
|
|
...(command === "serve"
|
|
? [
|
|
{
|
|
find: /^@heroui-vue\/styles\/css$/,
|
|
replacement: fileURLToPath(
|
|
new URL("../../packages/styles/index.css", import.meta.url),
|
|
),
|
|
},
|
|
]
|
|
: []),
|
|
{
|
|
find: /^@heroui-vue\/components$/,
|
|
replacement: fileURLToPath(
|
|
new URL("../../packages/vue/src/index.ts", import.meta.url),
|
|
),
|
|
},
|
|
{
|
|
find: /^@heroui-vue\/styles$/,
|
|
replacement: fileURLToPath(
|
|
new URL("../../packages/styles/src/index.ts", import.meta.url),
|
|
),
|
|
},
|
|
],
|
|
dedupe: ["vue"],
|
|
},
|
|
}));
|