-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathvite.config.mjs
40 lines (38 loc) · 870 Bytes
/
vite.config.mjs
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
import { createAppConfig } from '@nextcloud/vite-config'
import { defineConfig } from 'vite'
import { viteStaticCopy } from 'vite-plugin-static-copy'
import { resolve } from 'node:path'
const config = defineConfig({
plugins: [
viteStaticCopy({
targets: [
{
dest: 'js',
src: 'node_modules/zxing-wasm/dist/reader/zxing_reader.wasm'
}
]
})
],
build: {
sourcemap: false, // disabled, otherwise vite runs out of memory
},
test: {
coverage: {
include: ['src/**'],
provider: 'istanbul',
reporter: ['lcov', 'text'],
},
environment: 'happy-dom',
setupFiles: resolve(__dirname, './tests/javascript/unit/setup.js'),
server: {
deps: {
inline: [/@nextcloud\//],
}
},
},
})
export default createAppConfig({
main: 'src/main.js',
}, {
config
})