Skip to content

Commit

Permalink
feat: update to Vite 6 (#2530)
Browse files Browse the repository at this point in the history
- update minor dependencies
- update to Vite 6, see: https://vite.dev/blog/announcing-vite6

## Checklist

- [x] A changeset is added with `npx changeset add` if your changes
should be released as npm package (because they affect the library
usage)
  • Loading branch information
larsrickert authored Jan 16, 2025
1 parent def00d0 commit cc46754
Show file tree
Hide file tree
Showing 7 changed files with 911 additions and 1,500 deletions.
5 changes: 5 additions & 0 deletions .changeset/sour-humans-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@sit-onyx/shared": major
---

bump minimum required Vite version to `>= 6`
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "onyx-monorepo",
"type": "module",
"packageManager": "pnpm@9.12.3",
"packageManager": "pnpm@9.15.4",
"author": "Schwarz IT KG",
"license": "Apache-2.0",
"scripts": {
Expand Down Expand Up @@ -35,7 +35,7 @@
"@tsconfig/node22": "^22.0.0",
"@types/eslint": "^9.6.1",
"@types/jsdom": "^21.1.7",
"@types/node": "^22.10.6",
"@types/node": "^22.10.7",
"@vitejs/plugin-vue": "^5.2.1",
"@vitest/coverage-v8": "^2.1.8",
"@vitest/eslint-plugin": "^1.1.25",
Expand All @@ -49,18 +49,18 @@
"eslint-plugin-vue-scoped-css": "^2.9.0",
"eslint-plugin-vuejs-accessibility": "^2.4.1",
"jsdom": "^26.0.0",
"lint-staged": "^15.3.0",
"lint-staged": "^15.4.0",
"prettier": "^3.4.2",
"prettier-plugin-organize-imports": "^4.1.0",
"publint": "^0.3.2",
"rimraf": "^6.0.1",
"simple-git-hooks": "^2.11.1",
"storybook": "8.5.0-beta.11",
"stylelint": "^16.13.2",
"stylelint-no-unsupported-browser-features": "^8.0.2",
"turbo": "^2.3.3",
"typescript": "catalog:",
"typescript-eslint": "^8.20.0",
"stylelint": "^16.13.2",
"stylelint-no-unsupported-browser-features": "^8.0.2",
"vite": "catalog:",
"vitest": "^2.1.8",
"vue-tsc": "^2.2.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
"peerDependencies": {
"@vitejs/plugin-vue": "^5.1.4",
"sass-embedded": ">= 1.74.0",
"vite": ">= 5"
"vite": ">= 6"
}
}
7 changes: 2 additions & 5 deletions packages/shared/src/vite.config.base.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
import vue from "@vitejs/plugin-vue";
import { deprecations, type Deprecation, type Options } from "sass-embedded";
import { deprecations, type Deprecation } from "sass-embedded";
import type { UserConfig } from "vite";

type ViteScssOptions = Options<"async"> & { api: "modern-compiler" };

export const VITE_BASE_CONFIG = {
plugins: [vue()],
css: {
preprocessorOptions: {
scss: {
api: "modern-compiler",
// error for all warnings
fatalDeprecations: (Object.values(deprecations) as Deprecation[]).filter(
({ status }) => status !== "future",
),
} satisfies ViteScssOptions,
},
},
},
} as const satisfies UserConfig;
1 change: 1 addition & 0 deletions packages/sit-onyx/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export default defineConfig({
entry: getFilePath("./src/index.ts"),
formats: ["es", "cjs"],
fileName: "index",
cssFileName: "style",
},
rollupOptions: {
// make sure to externalize dependencies that shouldn't be bundled into the library
Expand Down
Loading

0 comments on commit cc46754

Please sign in to comment.