fix: Vite CJS Node API deprecated

This commit is contained in:
Marcel Hellkamp 2024-06-06 14:22:21 +02:00
parent 1d13a935ab
commit e8a4997688

View File

@ -3,13 +3,13 @@ import { fileURLToPath, URL } from "node:url";
import { defineConfig } from "vite"; import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue"; import vue from "@vitejs/plugin-vue";
import viteCompression from "vite-plugin-compression"; import viteCompression from "vite-plugin-compression";
import { gitDescribeSync } from "git-describe"; import gitDescribe from "git-describe";
import viteLegacy from "@vitejs/plugin-legacy"; import viteLegacy from "@vitejs/plugin-legacy";
let version; let version;
try { try {
const gitInfo = gitDescribeSync(); const gitInfo = gitDescribe.gitDescribeSync();
if (gitInfo.tag) { if (gitInfo.tag) {
version = `${gitInfo.tag}`; version = `${gitInfo.tag}`;
if (gitInfo.distance) if (gitInfo.distance)