mirror of
https://github.com/Buriburizaem0n/nezha-dash-v1.git
synced 2026-02-06 13:40:09 +00:00
fix: prettier config
This commit is contained in:
@@ -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,
|
||||
},
|
||||
});
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user