forked from peternewnham/react-html-parser
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvite.prod.ts
More file actions
31 lines (30 loc) · 675 Bytes
/
Copy pathvite.prod.ts
File metadata and controls
31 lines (30 loc) · 675 Bytes
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
29
30
31
import path from 'node:path';
import { defineConfig } from 'vite';
export default defineConfig({
build: {
emptyOutDir: false,
lib: {
entry: path.resolve(__dirname, 'src/index.ts'),
name: 'ReactHtmlParser',
formats: ['umd'],
fileName: 'react-html-parser.min',
},
rollupOptions: {
external: ['react'],
output: {
globals: {
react: 'React',
},
dir: path.resolve(__dirname, 'dist'),
entryFileNames: 'react-html-parser.min.js',
exports: 'named',
},
},
minify: 'terser',
terserOptions: {
compress: {
drop_console: true,
},
},
},
});