-
Notifications
You must be signed in to change notification settings - Fork 65
/
vite.config.ts
43 lines (41 loc) · 1.05 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
import type { UserConfig } from 'vitest/node'
import { createAppConfig } from '@nextcloud/vite-config'
import { join } from 'path'
// replaced by vite
declare const __dirname: string
export default createAppConfig({
api: join(__dirname, 'src', 'api.ts'),
app: join(__dirname, 'src', 'app.ts'),
sidebar: join(__dirname, 'src', 'sidebar.js'),
personalSettings: join(__dirname, 'src', 'settings-personal.js'),
adminSettings: join(__dirname, 'src', 'settings-admin.js'),
}, {
inlineCSS: { relativeCSSInjection: true },
thirdPartyLicense: false,
// for REUSE we should enable:
// extractLicenseInformation: true,
config: {
// Setup for vitest unit tests
test: {
environment: 'happy-dom',
coverage: {
all: true,
clean: true,
extension: ['.js', '.ts', '.vue'],
provider: 'v8',
},
root: 'src/',
deps: {
moduleDirectories: ['node_modules', '../node_modules'],
},
cache: {
dir: '../node_modules/.vitest',
},
server: {
deps: {
inline: [/@nextcloud\/vue/, /@mdi\/svg/],
},
},
} as UserConfig,
},
})