-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathvite.config.ts
50 lines (49 loc) · 1.41 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { resolve } from 'path'
import typescript from '@rollup/plugin-typescript'
// import * as path from 'path'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue(), typescript({ tsconfig: './tsconfig.rollup.json' })],
build: {
lib: {
entry: resolve(__dirname, 'src/index.ts'),
name: 'schedule-x-vue',
fileName: 'schedule-x-vue',
},
rollupOptions: {
external: ['vue', '@schedule-x/calendar'],
output: {
globals: {
vue: 'Vue',
},
},
},
},
// Comment in when developing locally, given that the schedule-x monorepo is located next to this repo.
// resolve: {
// alias: {
// '@schedule-x/calendar': path.resolve(
// __dirname,
// '../schedule-x/packages/calendar'
// ),
// '@schedule-x/drag-and-drop': path.resolve(
// __dirname,
// '../schedule-x/packages/drag-and-drop'
// ),
// '@schedule-x/event-modal': path.resolve(
// __dirname,
// '../schedule-x/packages/event-modal'
// ),
// '@schedule-x/theme-default': path.resolve(
// __dirname,
// '../schedule-x/packages/theme-default'
// ),
// '@schedule-x/date-picker': path.resolve(
// __dirname,
// '../schedule-x/packages/date-picker'
// ),
// },
// },
})