-
Notifications
You must be signed in to change notification settings - Fork 27
/
vite.config.ts
29 lines (26 loc) · 806 Bytes
/
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
/**
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: CC0-1.0
*/
import type { UserConfig } from 'vitest/config'
import { createAppConfig } from '@nextcloud/vite-config'
const config = createAppConfig({
main: 'src/index.ts',
}, {
// Build the css/logreader-style.css instead of inlineing the styles in the js bundle
inlineCSS: false,
assetFileNames: (info) => info.name === 'index.css' ? 'css/logreader-main.css' : undefined,
// Configuration for vitest unit tests
config: {
test: {
coverage: {
include: ['src/**'],
provider: 'istanbul',
reporter: ['lcov', 'text'],
},
environment: 'happy-dom',
alias: [{ find: /^vue$/, replacement: 'vue/dist/vue.runtime.common.js' }],
},
} as UserConfig,
})
export default config