vite.config.ts 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. import vue from "@vitejs/plugin-vue"
  2. import Icons from "unplugin-icons/vite"
  3. import { defineConfig } from "vite"
  4. import dts from "vite-plugin-dts"
  5. import Unfonts from "unplugin-fonts/vite"
  6. export default defineConfig({
  7. plugins: [
  8. vue(),
  9. dts({
  10. insertTypesEntry: true,
  11. skipDiagnostics: true,
  12. outputDir: ["dist"],
  13. }),
  14. Icons({
  15. compiler: "vue3",
  16. }),
  17. Unfonts({
  18. fontsource: {
  19. families: [
  20. {
  21. name: "Inter Variable",
  22. variables: ["variable-full"],
  23. },
  24. {
  25. name: "Material Symbols Rounded Variable",
  26. variables: ["variable-full"],
  27. },
  28. {
  29. name: "Roboto Mono Variable",
  30. variables: ["variable-full"],
  31. },
  32. ],
  33. },
  34. }),
  35. ], // to process SFC
  36. build: {
  37. sourcemap: true,
  38. minify: false,
  39. lib: {
  40. entry: {
  41. index: "./src/index.ts",
  42. "ui-preset": "./ui-preset.ts",
  43. "postcss.config": "./postcss.config.cjs",
  44. },
  45. formats: ["es"],
  46. },
  47. rollupOptions: {
  48. external: ["vue"],
  49. output: {
  50. exports: "named",
  51. },
  52. },
  53. emptyOutDir: true,
  54. },
  55. })