Skip to content

Commit 9e7e11f

Browse files
committed
chore: adjust viteconfig to remove outdated assets
CSS assets need to be cleaned if commited. So adding `css/` to the list of directories to clean on build. Also fix some code style issues and remove unneeded dependency. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent 06099c2 commit 9e7e11f

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

package-lock.json

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@
125125
"@nextcloud/stylelint-config": "^3.0.1",
126126
"@nextcloud/vite-config": "^1.5.3",
127127
"@types/markdown-it": "^14.1.2",
128-
"@vitejs/plugin-vue2": "^2.3.3",
129128
"@vitest/coverage-v8": "^3.1.1",
130129
"@vue/test-utils": "^1.3.0 <2",
131130
"@vue/tsconfig": "^0.5.1",

vite.config.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
// SPDX-FileCopyrightText: Ferdinand Thiessen <opensource@fthiessen.de>
22
// SPDX-License-Identifier: AGPL-3.0-or-later
33

4-
/// <reference types="vitest/config" />
4+
import type { ViteDevServer, Connect } from 'vite'
55

66
import { createAppConfig } from '@nextcloud/vite-config'
7-
import type { ViteDevServer, Connect } from 'vite'
87
import webpackStats from 'rollup-plugin-webpack-stats'
98
import path from 'path'
109

@@ -22,7 +21,7 @@ const rewriteMiddlewarePlugin = {
2221
}
2322
next()
2423
})
25-
}
24+
},
2625
}
2726

2827
const config = createAppConfig({
@@ -34,6 +33,9 @@ const config = createAppConfig({
3433
init: path.join(__dirname, 'src', 'init.js'),
3534
}, {
3635
createEmptyCSSEntryPoints: true,
36+
emptyOutputDirectory: {
37+
additionalDirectories: ['css/'],
38+
},
3739
extractLicenseInformation: {
3840
overwriteLicenses: {
3941
khroma: 'MIT',
@@ -74,7 +76,7 @@ const config = createAppConfig({
7476
server: {
7577
deps: {
7678
inline: [/@nextcloud.*/],
77-
}
79+
},
7880
},
7981
},
8082
server: {

0 commit comments

Comments
 (0)