-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathvite.config.ts
47 lines (43 loc) · 1.15 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
/**
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import type { UserConfig } from 'vitest/node'
import { join } from 'path'
import { createAppConfig } from '@nextcloud/vite-config'
// replaced by vite
declare const __dirname: string
export default createAppConfig({
files: join(__dirname, 'src', 'files.ts'),
settings: join(__dirname, 'src', 'settings.js'),
adminSettings: join(__dirname, 'src', 'settings-admin.js'),
filedrop: join(__dirname, 'src', 'filedrop.js'),
}, {
inlineCSS: { relativeCSSInjection: true },
extractLicenseInformation: true,
thirdPartyLicense: false,
config: {
// Setup for vitest unit tests
test: {
include: ['src/**/*.{test,spec}.?(c|m)[jt]s?(x)'],
environment: 'jsdom',
environmentOptions: {
jsdom: {
url: 'http://nextcloud.local',
},
},
coverage: {
include: ['src/**'],
exclude: ['**.spec.*', '**.test.*', '**.cy.*'],
provider: 'v8',
reporter: ['lcov', 'text'],
},
setupFiles: ['__tests__/setup-testing-library'],
server: {
deps: {
inline: [/@nextcloud\//],
},
},
} as UserConfig,
},
})