From 1e698f28cb64f7af19b3c263526e464946db5788 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Fri, 1 May 2026 08:40:25 +0000 Subject: [PATCH] Specify vite version Co-authored-by: Copilot --- plugin_creator/frontend.py | 8 +++++--- plugin_creator/template/cookiecutter.json | 1 + .../{{ cookiecutter.plugin_name }}/frontend/package.json | 7 ++++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/plugin_creator/frontend.py b/plugin_creator/frontend.py index c4295c8..b47fec7 100644 --- a/plugin_creator/frontend.py +++ b/plugin_creator/frontend.py @@ -7,10 +7,11 @@ from .helpers import remove_file, remove_dir -# Minimum version requirements for core frontend libraries +# Version requirements for core frontend libraries MIN_REACT_VERSION = "19.1.2" -MIN_MANTINE_VERSION = "8.3.10" -MIN_LINGUI_VERSION = "5.9.5" +MIN_MANTINE_VERSION = "8.2.7" +MIN_LINGUI_VERSION = "5.9.2" +MIN_VITE_VERSION = "6.4.2" def frontend_features() -> dict: @@ -76,6 +77,7 @@ def define_frontend(enabled: bool, defaults: bool = False) -> dict: "react_version": MIN_REACT_VERSION, "mantine_version": MIN_MANTINE_VERSION, "lingui_version": MIN_LINGUI_VERSION, + "vite_version": MIN_VITE_VERSION, } if enabled: diff --git a/plugin_creator/template/cookiecutter.json b/plugin_creator/template/cookiecutter.json index 140d2f7..3a12c81 100644 --- a/plugin_creator/template/cookiecutter.json +++ b/plugin_creator/template/cookiecutter.json @@ -36,6 +36,7 @@ "react_version": "0.0.0", "lingui_version": "0.0.0", "mantine_version": "0.0.0", + "vite_version": "0.0.0", "features": { "dashboard": true, "panel": true, diff --git a/plugin_creator/template/{{ cookiecutter.plugin_name }}/frontend/package.json b/plugin_creator/template/{{ cookiecutter.plugin_name }}/frontend/package.json index bb8ea0f..2a28703 100644 --- a/plugin_creator/template/{{ cookiecutter.plugin_name }}/frontend/package.json +++ b/plugin_creator/template/{{ cookiecutter.plugin_name }}/frontend/package.json @@ -36,15 +36,16 @@ "@vitejs/plugin-react": "^4.7.0", "globals": "^15.14.0", "typescript": "~5.6.2", - "vite": "^6.0.5", + "vite": "^{{ cookiecutter.frontend.vite_version }}", "vite-plugin-externals": "^0.6.2" }, "overrides": { - "glob": ">= 13.0.0", {% if cookiecutter.frontend.translation -%} "@lingui/core": "^{{ cookiecutter.frontend.lingui_version }}", "@lingui/cli": "^{{ cookiecutter.frontend.lingui_version }}", - "@lingui/macro": "^{{ cookiecutter.frontend.lingui_version }}" + "@lingui/macro": "^{{ cookiecutter.frontend.lingui_version }}", {%- endif %} + "glob": ">= 13.0.0", + "vite": "^{{ cookiecutter.frontend.vite_version }}" } }