copy jszip from vendor zo public

This commit is contained in:
2026-05-12 19:07:02 +02:00
parent c74f11794d
commit 824170eaea
4 changed files with 30 additions and 0 deletions

15
scripts/copy-vendor.mjs Normal file
View File

@@ -0,0 +1,15 @@
import fs from 'fs';
import path from 'path';
// Copies vendor browser bundles from node_modules into public/s/js/
const vendors = [
{ src: 'jszip/dist/jszip.min.js', dest: 'public/s/js/jszip.min.js' },
];
for (const { src, dest } of vendors) {
const srcPath = path.join(process.cwd(), 'node_modules', src);
const destPath = path.join(process.cwd(), dest);
fs.copyFileSync(srcPath, destPath);
const size = fs.statSync(destPath).size;
console.log(`Copied: ${src} -> ${dest} (${size} bytes)`);
}