10 lines
261 B
JavaScript
10 lines
261 B
JavaScript
let archiverModulePromise = null;
|
|
|
|
async function createZipArchive(options = {}) {
|
|
archiverModulePromise ||= import('archiver');
|
|
const { ZipArchive } = await archiverModulePromise;
|
|
return new ZipArchive(options);
|
|
}
|
|
|
|
module.exports = { createZipArchive };
|