-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathvite.config.ts
More file actions
38 lines (35 loc) · 1.03 KB
/
vite.config.ts
File metadata and controls
38 lines (35 loc) · 1.03 KB
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
// SPDX-FileCopyrightText: Ferdinand Thiessen <opensource@fthiessen.de>
// SPDX-License-Identifier: AGPL-3.0-or-later
import { createAppConfig } from '@nextcloud/vite-config'
import path from 'path'
const config = createAppConfig({
reference: path.join(__dirname, 'src', 'reference.js'),
files: path.join(__dirname, 'src', 'file-actions.js'),
main: path.join(__dirname, 'src', 'main.js'),
}, {
inlineCSS: {
jsAssetsFilterFunction: (chunk) => {
return chunk.name === 'main' ||
chunk.fileName.includes('main') ||
chunk.fileName.includes('tables-main') ||
chunk.name === 'reference' ||
chunk.fileName.includes('reference') ||
chunk.fileName.includes('SmartPicker');
}
},
config: {
build: {
cssCodeSplit: false,
rollupOptions: {
output: {
manualChunks: (id) => {
if (id.includes('img/material/')) {
return 'material-icons'
}
},
},
},
},
},
})
export default config