fix43: убрать lint-хвосты и нормализовать пути chunks

This commit is contained in:
2026-05-21 15:46:26 +05:00
parent e1ecaf485f
commit b0cdf6207c
6 changed files with 22 additions and 93 deletions
@@ -71,7 +71,6 @@ watch(
);
</script>
<style lang="scss" scoped></style>
+1 -1
View File
@@ -26,7 +26,7 @@ body {
height: 100%;
margin: 0;
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB",
"Microsoft YaHei", Arial, Arial, sans-serif;
"Microsoft YaHei", Arial, sans-serif;
line-height: inherit;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
@@ -980,10 +980,8 @@ export default {
<script setup lang="ts">
import {
ConfigsUpdateDto,
defaultHysteria2ServerConfig,
Hysteria2ServerConfig,
Tab,
} from "@/api/config/types";
import Outbounds from "./components/Outbounds/index.vue";
import {
@@ -994,10 +992,7 @@ import {
} from "@/api/config";
import { useI18n } from "vue-i18n";
import { assignWith, deepCopy } from "@/utils/copy";
import {
UploadFile,
UploadRequestOptions,
} from "element-plus";
import { UploadRequestOptions } from "element-plus";
import { dashboardSummaryApi } from "@/api/dashboard";
import { UploadUserFile } from "element-plus";
@@ -1087,71 +1082,6 @@ const {
keyFileList,
} = toRefs(state);
const tabs = computed(() => {
let tabs: Tab[] = [];
if (!state.obfs) {
tabs.push({
name: "obfs",
desc: t("hysteria.obfs"),
});
}
if (!state.quic) {
tabs.push({
name: "quic",
desc: t("hysteria.quic"),
});
}
if (!state.bandwidth) {
tabs.push({
name: "bandwidth",
desc: t("hysteria.bandwidth"),
});
}
if (!state.speedTest) {
tabs.push({
name: "speedTest",
desc: t("hysteria.speedTest"),
});
}
if (!state.udp) {
tabs.push({
name: "udp",
desc: t("hysteria.udp"),
});
}
if (!state.resolver) {
tabs.push({
name: "resolver",
desc: t("hysteria.resolver"),
});
}
if (!state.sniff) {
tabs.push({
name: "sniff",
desc: t("hysteria.sniff"),
});
}
if (!state.acl) {
tabs.push({
name: "acl",
desc: t("hysteria.acl"),
});
}
if (!state.outbounds) {
tabs.push({
name: "outbounds",
desc: t("hysteria.outbounds"),
});
}
if (!state.masquerade) {
tabs.push({
name: "masquerade",
desc: t("hysteria.masquerade"),
});
}
return tabs;
});
const handleExport = async () => {
let response = await exportHysteria2ConfigApi();
try {
@@ -108,6 +108,4 @@ onMounted(() => {
});
</script>
<style lang="scss" scoped></style>
@@ -108,6 +108,3 @@ onMounted(() => {
});
</script>
<style lang="scss" scoped></style>
+18 -13
View File
@@ -106,37 +106,42 @@ export default defineConfig((): UserConfig => {
rollupOptions: {
output: {
manualChunks(id: string) {
if (!id.includes("node_modules")) {
const normalizedId = id.replaceAll("\\", "/");
if (!normalizedId.includes("node_modules")) {
return;
}
if (
id.includes("echarts") ||
id.includes("zrender") ||
id.includes("vue-echarts")
normalizedId.includes("echarts") ||
normalizedId.includes("zrender") ||
normalizedId.includes("vue-echarts")
) {
return "charts";
}
if (
id.includes("element-plus") ||
id.includes("@element-plus") ||
id.includes("@popperjs")
normalizedId.includes("element-plus") ||
normalizedId.includes("@element-plus") ||
normalizedId.includes("@popperjs")
) {
return "element-plus";
}
if (
id.includes("/vue/") ||
id.includes("vue-router") ||
id.includes("pinia") ||
id.includes("vue-i18n") ||
id.includes("@vueuse")
normalizedId.includes("/vue/") ||
normalizedId.includes("vue-router") ||
normalizedId.includes("pinia") ||
normalizedId.includes("vue-i18n") ||
normalizedId.includes("@vueuse")
) {
return "vue-core";
}
if (id.includes("qrcode.vue") || id.includes("vuedraggable")) {
if (
normalizedId.includes("qrcode.vue") ||
normalizedId.includes("vuedraggable")
) {
return "ui-extra";
}