vite.config.js 614 B

1234567891011121314151617181920212223242526
  1. import { resolve } from 'path'
  2. import { defineConfig } from 'vite'
  3. export default defineConfig({
  4. build: {
  5. lib: {
  6. // Could also be a dictionary or array of multiple entry points
  7. entry: resolve(__dirname, 'index.ts'),
  8. name: 'tabler-react',
  9. // the proper extensions will be added
  10. fileName: 'tabler-react',
  11. },
  12. rollupOptions: {
  13. // make sure to externalize deps that shouldn't be bundled
  14. // into your library
  15. external: ['react'],
  16. output: {
  17. // Provide global variables to use in the UMD build
  18. // for externalized deps
  19. globals: {
  20. react: 'React',
  21. },
  22. },
  23. },
  24. },
  25. })