forked from nhn/tui.calendar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
44 lines (41 loc) · 1 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
import * as path from 'path';
import { defineConfig } from 'vite';
// eslint-disable-next-line @typescript-eslint/no-var-requires
const pkg = require('./package.json');
const banner = [
'/*!',
' * TOAST UI Calendar 2nd Edition',
` * @version ${pkg.version} | ${new Date().toDateString()}`,
` * @author ${pkg.author}`,
` * @license ${pkg.license}`,
' */',
].join('\n');
export default defineConfig(() => {
return {
build: {
emptyOutDir: false,
lib: {
entry: path.resolve(__dirname, 'src/index.ts'),
formats: ['es'],
fileName: () => 'toastui-calendar.mjs',
},
target: 'es2015',
rollupOptions: {
external: ['tui-date-picker', 'tui-time-picker'],
output: {
banner,
},
},
},
esbuild: {
jsxFactory: 'h',
jsxFragment: 'Fragment',
},
resolve: {
alias: {
'@src': path.resolve(__dirname, './src'),
'@t': path.resolve(__dirname, './src/types'),
},
},
};
});