vite.config.ts 782 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. import { defineConfig } from "vite";
  2. import { resolve } from "path";
  3. import vue from "@vitejs/plugin-vue";
  4. import dts from "vite-plugin-dts";
  5. // https://vitejs.dev/config/
  6. export default defineConfig({
  7. plugins: [
  8. vue(),
  9. dts({
  10. tsconfigPath: "./tsconfig.json",
  11. rollupTypes: true,
  12. outDir: './typings',
  13. insertTypesEntry: true,
  14. }),
  15. ],
  16. build: {
  17. outDir: "lib",
  18. sourcemap: true,
  19. manifest: true,
  20. minify: true,
  21. lib: {
  22. formats: ["cjs", "es", "umd"],
  23. entry: resolve(__dirname, "./components/index.ts"),
  24. name: "shaluDashboardUi",
  25. fileName: "shalu-dashboard-ui",
  26. },
  27. rollupOptions: {
  28. external: ["vue"],
  29. output: {
  30. globals: {
  31. vue: "Vue",
  32. },
  33. },
  34. },
  35. },
  36. });