Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
5574be6
chore(deps-dev): Bump vite from 7.3.1 to 8.0.7
dependabot[bot] Apr 7, 2026
33ef6a5
fix: adjust appconfig for vite 8
susnux Apr 7, 2026
c268576
fix(CSSEntryPlugin): adjust for vite 8
susnux Apr 7, 2026
b7e23e9
fix(ImportCSS): adjust for vite 8
susnux Apr 7, 2026
c57368f
fix(REUSELicensePlugin): adjust for vite 8
susnux Apr 7, 2026
3e1ca89
fix(libconfig): adjust for vite 8
susnux Apr 7, 2026
0adcc91
fix(baseconfig): adjust for vite 8
susnux Apr 7, 2026
c9539cd
chore!: remove `thirdPartyLicense` option - replaced by vite native `…
susnux Apr 7, 2026
8782ab1
chore!: remove vite 7 workarounds for CSSEntryPoints plugin
susnux Apr 7, 2026
edb02e8
chore: remove `RemoveEnsureWatch` plugin as resolved by vite v8
susnux Apr 8, 2026
f16401f
chore: replace rollup replace plugin with rolldown version
susnux Apr 8, 2026
c511204
fix(appconfig): adjust for vite v8
susnux Apr 8, 2026
ea23e4c
chore(libconfig): use `rolldown-plugin-dts`
susnux Apr 8, 2026
566b94b
chore: cleanup package.json and resolve linter issues
susnux Apr 8, 2026
ca2d14b
feat: add support for vue 2 (with manual dependency adjustments)
susnux Apr 13, 2026
a066e2c
test: add e2e tests for configuration
susnux Apr 13, 2026
a510306
fix(app-config): handle webp as image file
susnux Apr 13, 2026
bf54034
docs: add changelog for breaking changes
susnux Apr 13, 2026
4bd01dd
chore!: remove vite v7 workarounds of baseconfig
susnux Apr 15, 2026
245057b
chore!: remove vite v7 workarounds of libconfig
susnux Apr 15, 2026
003b691
fix(appConfig): properly handle code splitting
susnux May 18, 2026
d4ef366
fixup! fix(appConfig): properly handle code splitting
susnux May 18, 2026
ee7cd9e
fix: properly handle comments when minify is set
susnux May 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ updates:
- package-ecosystem: npm
target-branch: "main"
directory: "/"
cooldown:
default-days: 4
semver-major-days: 8
schedule:
interval: "weekly"
day: "saturday"
Expand All @@ -29,6 +32,44 @@ updates:
- "vitest"
- "@vitest/*"

- package-ecosystem: npm
target-branch: "main"
directories:
- "/tests"
- "/tests/*"
cooldown:
default-days: 8
schedule:
interval: "monthly"
day: "saturday"
time: "03:30"
timezone: "Europe/Paris"
open-pull-requests-limit: 10
versioning-strategy: "increase"

###################
# STABLE BRANCHES #

- package-ecosystem: npm
target-branch: "stable2"
directory: "/"
schedule:
interval: "weekly"
day: "saturday"
time: "03:00"
timezone: "Europe/Paris"
open-pull-requests-limit: 10
versioning-strategy: "increase"
groups:
vitest:
patterns:
- "vitest"
- "@vitest/*"
ignore:
- dependency-name: "*"
# ignore all major updates
update-types: ["version-update:semver-major"]

- package-ecosystem: npm
target-branch: "stable1"
directory: "/"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/node-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
CYPRESS_INSTALL_BINARY: 0
run: |
npm ci
npx playwright install chromium
npm run build --if-present

- name: Test
Expand Down
12 changes: 9 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# SPDX-FileCopyrightText: 2023 Ferdinand Thiessen <opensource@fthiessen.de>
# SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: AGPL-3.0-or-later

.vitest*/
js/
css/
dist/
img/
__screenshots__/
__fixtures__/*/js
coverage/
dist/
node_modules/
js/
nextcloud-vite-config*.tgz
tests/package-lock.json
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
# Changelog
<!--
- SPDX-FileCopyrightText: Nextcloud GmbH and Nextcloud contributors
- SPDX-License-Identifier: AGPL-3.0-or-later
-->

## v3.0.0 [UNRELEASED]
### Breaking changes
* This configuration is now only working with Vite v8 (rolldown / OXC based).
* The `thirdPartyLicense` config option has been removed.
We recommend using SPDX headers, which is already the default for apps with the `extractLicenseInformation` option.
If you really need a bill-of-materials you can use the now native Vite option `build.license`.
* This configuration version is now compatible with apps targeting Vue 3 and Vue 2.
For Vue 2 you will have to adjust your dependencies a bit, [more information can be found in the README](./README.md#use-with-vue-2).

## [v2.5.2](https://github.com/nextcloud-libraries/nextcloud-vite-config/compare/v2.5.1...v2.5.2) (2025-10-20)
### 🐛 Fixed bugs
Expand Down
170 changes: 170 additions & 0 deletions LICENSES/CC-BY-SA-4.0.txt

Large diffs are not rendered by default.

30 changes: 28 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
[![REUSE status](https://api.reuse.software/badge/github.com/nextcloud-libraries/nextcloud-vite-config)](https://api.reuse.software/info/github.com/nextcloud-libraries/nextcloud-vite-config)
[![npm last version](https://img.shields.io/npm/v/@nextcloud/vite-config.svg?style=flat-square)](https://www.npmjs.com/package/@nextcloud/vite-config) [![Project documentation](https://img.shields.io/badge/documentation-online-blue?style=flat-square)](https://nextcloud-libraries.github.io/nextcloud-vite-config/)

Shared Vite ⚡ config for Nextcloud apps and libraries, which also can be easily extended.
<!--
- SPDX-FileCopyrightText: Nextcloud GmbH and Nextcloud contributors
- SPDX-License-Identifier: AGPL-3.0-or-later
-->

**Please note version 2+ is for Vue 3 only, for Vue 2.7 use the 1.x version.**
Shared Vite ⚡ config for Nextcloud apps and libraries, which also can be easily extended.

## API reference

Expand Down Expand Up @@ -82,6 +85,24 @@ export default createLibConfig({
})
```

### Use with Vue 2
If you still require Vue 2 support this is possible by manually adjusting your dependencies
to use the vue 2 plugin for vite instead.
For this you need to override `@vitejs/plugin-vue` with `@vitejs/plugin-vue2` and adjust its peer dependencies,
this can be done in the *package.json* like this:
```diff
"devDependencies": {
"@nextcloud/vite-config": "^3.0.0",
+ "@vitejs/plugin-vue": "npm:@vitejs/plugin-vue2@>=2.3.4"
"vite": "^8.0.0"
},
+"overrides": {
+ "@vitejs/plugin-vue": {
+ "vite": "^8"
+ }
+}
```

### Notes

#### Inlining / injecting CSS
Expand All @@ -97,6 +118,11 @@ This way the library user can decide how to handle the imported CSS without rely

## Development

### Testing
To make sure all use cases properly work using this configuration,
we created some "end-to-end" tests for it. Those tests are placed
inside the `tests/` directory and resemble small test apps.

### 📤 Releasing a new version

- Pull the latest changes from `main` or `stableX`
Expand Down
8 changes: 5 additions & 3 deletions REUSE.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
# SPDX-FileCopyrightText: 2024 Ferdinand Thiessen <opensource@fthiessen.de>
# SPDX-License-Identifier: AGPL-3.0-or-later

version = 1
SPDX-PackageName = "nextcloud-vite-config"
SPDX-PackageSupplier = "Ferdinand Thiessen <rpm@fthiessen.de>"
SPDX-PackageSupplier = "Nextcloud GmbH and Nextcloud contributors"
SPDX-PackageDownloadLocation = "https://github.com/nextcloud-libraries/nextcloud-vite-config"

[[annotations]]
path = ["package-lock.json", "package.json", "tsconfig.json", "banner-template.txt", "README.md", "CHANGELOG.md", "__tests__/__snapshots__/**"]
path = ["package-lock.json", "package.json", "tsconfig.json", "**/package.json", "**/package-lock.json"]
precedence = "aggregate"
SPDX-FileCopyrightText = "Ferdinand Thiessen <rpm@fthiessen.de>"
SPDX-FileCopyrightText = "Nextcloud GmbH and Nextcloud contributors"
SPDX-License-Identifier = "AGPL-3.0-or-later"
6 changes: 0 additions & 6 deletions __fixtures__/app_process_env/main.cjs

This file was deleted.

7 changes: 0 additions & 7 deletions __tests__/__snapshots__/appconfig.spec.ts.snap

This file was deleted.

134 changes: 0 additions & 134 deletions __tests__/appconfig.spec.ts

This file was deleted.

32 changes: 0 additions & 32 deletions __tests__/baseconfig.spec.ts

This file was deleted.

Loading
Loading