-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvite.config.ts
More file actions
50 lines (40 loc) · 1.43 KB
/
vite.config.ts
File metadata and controls
50 lines (40 loc) · 1.43 KB
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
/*****************************************************************************************************************/
// @author Michael Roberts <michael@observerly.com>
// @package @observerly/fits
// @license Copyright © 2021-2025 observerly
/*****************************************************************************************************************/
/// <reference types="vitest" />
/*****************************************************************************************************************/
import { defineConfig } from 'vite'
import typescript from '@rollup/plugin-typescript'
import { resolve } from 'node:path'
/*****************************************************************************************************************/
export default defineConfig({
plugins: [
typescript({
tsconfig: './tsconfig.json'
})
],
resolve: {
alias: {
'@': resolve(__dirname, '/src')
}
},
build: {
outDir: './dist',
lib: {
// Could also be a dictionary or array of multiple entry points
entry: resolve(__dirname, 'src/index.ts'),
name: '@observerly/fits',
// the proper extensions will be added
fileName: 'fits'
},
rollupOptions: {
external: ['./playground/*.ts'],
output: {
sourcemap: true
}
}
}
})
/*****************************************************************************************************************/