-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvite.config.mts
More file actions
29 lines (24 loc) · 827 Bytes
/
vite.config.mts
File metadata and controls
29 lines (24 loc) · 827 Bytes
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: 2025 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import type { ConfigEnv } from 'vite'
import { createLibConfig } from '@nextcloud/vite-config'
import { join } from 'node:path'
import istanbul from 'rollup-plugin-istanbul'
export default async function(env: ConfigEnv) {
const config = await createLibConfig({
index: join(__dirname, 'lib/index.ts'),
commands: join(__dirname, 'lib/commands/index.ts'),
selectors: join(__dirname, 'lib/selectors/index.ts'),
docker: join(__dirname, 'lib/docker.ts'),
cypress: join(__dirname, 'lib/cypress.ts'),
playwright: join(__dirname, 'lib/playwright.ts'),
}, {
libraryFormats: ['cjs', 'es'],
})(env)
if (env.mode === 'instrumented') {
config.plugins!.push(istanbul())
}
return config
}