-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.js
34 lines (33 loc) · 941 Bytes
/
vite.config.js
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
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
export default defineConfig({
plugins: [vue()],
build: {
lib: {
entry: 'src/index.js', // Replace with the path to your entry file
name: 'QuickLists',
fileName: (format) => `quicklists.${format}.js`,
},
rollupOptions: {
// Make sure to externalize dependencies that you don't want to bundle
external: ['vue', 'vuetify', 'dayjs'], // Externalize dayjs
output: {
// Provide global variables to use in the UMD build
// for externalized deps
globals: {
vue: 'Vue',
vuetify: 'Vuetify',
dayjs: 'dayjs', // Add dayjs as a global variable
},
},
},
},
resolve: {
alias: {
dayjs: 'dayjs', // Ensure it resolves to the main package
},
},
optimizeDeps: {
include: ['dayjs'], // Pre-bundle dayjs to avoid import issues
},
});