UNPKG

@glide-ui/react-tabs

Version:

A flexible and customizable tab component for React applications

49 lines (46 loc) 1.24 kB
import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; import { dirname, resolve } from 'node:path'; import { fileURLToPath } from 'node:url'; import dts from 'vite-plugin-dts'; const __dirname = dirname(fileURLToPath(import.meta.url)); // https://vitejs.dev/config/ export default defineConfig({ build: { lib: { entry: resolve(__dirname, 'src/index.tsx'), name: '@glide-ui/react-tabs', fileName: 'index', }, rollupOptions: { // make sure to externalize deps that shouldn't be bundled // into your library external: ['react', 'react-dom', 'react/jsx-runtime'], output: { // Provide global variables to use in the UMD build // for externalized deps globals: { react: 'React', 'react-dom': 'ReactDOM', 'react/jsx-runtime': 'jsxRuntime', }, }, }, }, plugins: [ react(), dts({ insertTypesEntry: true, include: ['src'], exclude: ['src/main.tsx', 'src/__tests__'], rollupTypes: false, }), ], css: { preprocessorOptions: { scss: { api: 'modern-compiler', }, }, }, });