feat: initialize Vue component library and aligned documentation
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
import tailwindcss from "@tailwindcss/vite";
|
||||
import { defineConfig } from "vitepress";
|
||||
import { docsDataPlugin } from "./docs-data";
|
||||
import { fileURLToPath } from "node:url";
|
||||
export default defineConfig({
|
||||
lang: "zh-CN",
|
||||
title: "HeroUI Vue",
|
||||
description: "美观、现代的 Vue UI 组件库",
|
||||
appearance: true,
|
||||
cleanUrls: true,
|
||||
head: [["meta", { name: "theme-color", content: "#f5f5f5" }]],
|
||||
markdown: { headers: { level: [2, 3] } },
|
||||
vite: {
|
||||
plugins: [
|
||||
tailwindcss(),
|
||||
{
|
||||
name: "workspace-source-dev",
|
||||
apply: "serve",
|
||||
config: () => ({
|
||||
resolve: {
|
||||
alias: [
|
||||
{
|
||||
find: /^@heroui-vue\/components$/,
|
||||
replacement: fileURLToPath(
|
||||
new URL(
|
||||
"../../../packages/vue/src/index.ts",
|
||||
import.meta.url,
|
||||
),
|
||||
),
|
||||
},
|
||||
{
|
||||
find: /^@heroui-vue\/styles\/css$/,
|
||||
replacement: fileURLToPath(
|
||||
new URL(
|
||||
"../../../packages/styles/index.css",
|
||||
import.meta.url,
|
||||
),
|
||||
),
|
||||
},
|
||||
{
|
||||
find: /^@heroui-vue\/styles$/,
|
||||
replacement: fileURLToPath(
|
||||
new URL(
|
||||
"../../../packages/styles/src/index.ts",
|
||||
import.meta.url,
|
||||
),
|
||||
),
|
||||
},
|
||||
],
|
||||
dedupe: ["vue"],
|
||||
},
|
||||
optimizeDeps: {
|
||||
exclude: ["@heroui-vue/components", "@heroui-vue/styles"],
|
||||
},
|
||||
}),
|
||||
},
|
||||
docsDataPlugin(fileURLToPath(new URL("..", import.meta.url))),
|
||||
],
|
||||
server: {
|
||||
host: "127.0.0.1",
|
||||
port: 5173,
|
||||
strictPort: true,
|
||||
watch: { ignored: ["**/.vitepress/dist/**"] },
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user