diff --git a/src/utils.js b/src/utils.js index c839143..d018ea3 100644 --- a/src/utils.js +++ b/src/utils.js @@ -73,7 +73,8 @@ export async function asyncBufferFromUrl(url) { * @returns {Promise} */ export async function asyncBufferFromFile(filename) { - const fs = await import('fs') + const fsPackage = 'fs' // webpack no include + const fs = await import(fsPackage) const stat = await fs.promises.stat(filename) return { byteLength: stat.size,