mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-05 19:24:39 +00:00
feat: migrate pdfjs to local & bump ver
This commit is contained in:
@@ -84,6 +84,24 @@ export default defineConfig(({ command }) => ({
|
||||
settings: join(__dirname, "src", "interface", "index.html"),
|
||||
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]";
|
||||
},
|
||||
},
|
||||
onwarn(warning, warn) {
|
||||
if (warning.code === "FILE_NAME_CONFLICT") return;
|
||||
warn(warning);
|
||||
|
||||
Reference in New Issue
Block a user