forked from Kuechlin/mantine-data-grid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
28 lines (27 loc) · 819 Bytes
/
vite.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import { resolve } from 'path';
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { visualizer } from 'rollup-plugin-visualizer';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react(), visualizer()],
build: {
lib: {
entry: resolve(__dirname, 'src', 'index.ts'),
name: 'mantine-data-grid',
fileName: 'mantine-data-grid',
},
rollupOptions: {
// make sure to externalize deps that shouldn't be bundled
// into your library
external: ['dayjs', 'react', 'react-dom', '@mantine/core', '@mantine/dates', '@mantine/hooks'],
output: {
// Provide global variables to use in the UMD build
// for externalized deps
globals: {
react: 'React',
},
},
},
},
});