-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvite.config.ts
38 lines (37 loc) · 930 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
29
30
31
32
33
34
35
36
37
38
import vue from '@vitejs/plugin-vue';
import typescript2 from 'rollup-plugin-typescript2';
import * as path from 'path';
import { defineConfig } from 'vite';
module.exports = defineConfig({
build: {
lib: {
entry: path.resolve(__dirname, 'src/modules/VueFileUploaderPlugin.ts'),
formats: ['es', 'cjs'],
name: 'VueFileUploader',
fileName: (format) => format === 'es' ? 'index.js' : 'index.cjs'
},
rollupOptions: {
external: ['vue'],
output: {
globals: {
vue: 'Vue'
},
},
},
},
plugins: [
vue(),
typescript2({
check: false,
include: [path.resolve(__dirname, 'src/modules/**/*.vue')],
exclude: [path.resolve(__dirname, 'vite.config.ts')],
tsconfigOverride: {
compilerOptions: {
sourceMap: true,
declaration: true,
declarationMap: true,
},
},
}),
],
});