forked from ACTom/files_mindmap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
33 lines (30 loc) · 692 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
30
31
32
33
import { join } from 'path'
import { viteStaticCopy } from 'vite-plugin-static-copy'
import { createAppConfig } from '@nextcloud/vite-config'
// replaced by vite
declare const __dirname: string
export default createAppConfig({
mindmap: join(__dirname, 'src', 'mindmap.js'),
}, {
inlineCSS: { relativeCSSInjection: true },
config: {
experimental: {
renderBuiltUrl(filename) {
return {
// already contains the "js/" prefix as it is our output file configuration
runtime: `OC.filePath('files_mindmap', '', '${filename}')`,
}
},
},
plugins: [
viteStaticCopy({
targets: [
{
src: 'src/viewer.js',
dest: 'js'
}
]
})
]
},
})