-
Notifications
You must be signed in to change notification settings - Fork 53
Expand file tree
/
Copy pathvite.config.lib.ts
More file actions
35 lines (34 loc) · 842 Bytes
/
Copy pathvite.config.lib.ts
File metadata and controls
35 lines (34 loc) · 842 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
32
33
34
35
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { fileURLToPath, URL } from 'node:url'
import { resolve } from 'path'
import libCss from 'vite-plugin-libcss';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue(), libCss()],
build: {
minify: true,
outDir: 'build',
emptyOutDir: true,
cssCodeSplit: true,
lib: {
entry: resolve(__dirname, './src/components/datepicker/DatePickerComponent.vue'),
name:'vuejs3-datepicker'
},
rollupOptions: {
external: ['vue'],
output: {
// Provide global variables to use in the UMD build
// for externalized deps
globals: {
vue: 'Vue',
},
},
}
},
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
}
})