fix: prettier config

This commit is contained in:
hamster1963
2024-12-13 17:26:28 +08:00
parent 1483ce56fa
commit 9a2f3ea8e6
81 changed files with 1666 additions and 2286 deletions

View File

@@ -1,17 +1,17 @@
import path from "path";
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react-swc";
import { execSync } from "child_process";
import react from "@vitejs/plugin-react-swc"
import { execSync } from "child_process"
import path from "path"
import { defineConfig } from "vite"
// Get git commit hash
const getGitHash = () => {
try {
return execSync("git rev-parse --short HEAD").toString().trim();
return execSync("git rev-parse --short HEAD").toString().trim()
} catch (e) {
console.log(e);
return "unknown";
console.log(e)
return "unknown"
}
};
}
// https://vite.dev/config/
export default defineConfig({
@@ -50,15 +50,11 @@ export default defineConfig({
assetFileNames: `assets/[name].[hash].[ext]`,
manualChunks(id) {
if (id.includes("node_modules")) {
return id
.toString()
.split("node_modules/")[1]
.split("/")[0]
.toString();
return id.toString().split("node_modules/")[1].split("/")[0].toString()
}
},
},
},
chunkSizeWarningLimit: 1500,
},
});
})