feat: some messed up stuff to fix some stuff

This commit is contained in:
2026-04-07 08:46:28 +09:30
parent 73f005d645
commit 05cf380e86
8 changed files with 38 additions and 31 deletions
+1 -16
View File
@@ -85,22 +85,7 @@ export default defineConfig(({ command }) => ({
pageState: join(__dirname, "src", "pageState.js"),
},
output: {
assetFileNames(info) {
const labels = [
...(info.names ?? []),
...(info.originalFileNames ?? []),
].join(" ");
if (
labels.includes("pdf.worker.min") ||
labels.includes("pdf.worker.mjs")
) {
return "resources/pdfjs/pdf.worker.min.mjs";
}
if (labels.includes("legacy") && labels.includes("pdf.min")) {
return "resources/pdfjs/pdf.legacy.min.mjs";
}
return "assets/[name]-[hash][extname]";
},
assetFileNames: "assets/[name]-[hash][extname]",
},
onwarn(warning, warn) {
if (warning.code === "FILE_NAME_CONFLICT") return;