vite.config.ts 707 B

1234567891011121314151617181920212223242526272829303132333435
  1. import path from 'node:path';
  2. import vue from '@vitejs/plugin-vue';
  3. import { defineConfig } from 'vite';
  4. export default defineConfig({
  5. build: {
  6. lib: {
  7. // eslint-disable-next-line unicorn/prefer-module
  8. entry: path.resolve(__dirname, 'src/components/bpmn/index.ts'),
  9. fileName: `index`,
  10. name: 'index',
  11. },
  12. minify: 'terser',
  13. rollupOptions: {
  14. external: ['vue'],
  15. output: {
  16. exports: 'named',
  17. globals: {
  18. vue: 'Vue',
  19. },
  20. },
  21. },
  22. terserOptions: {
  23. compress: {
  24. drop_console: true,
  25. drop_debugger: true,
  26. },
  27. format: {
  28. comments: false,
  29. },
  30. },
  31. },
  32. plugins: [vue()],
  33. });