mirror of
https://github.com/asadbek064/hyparquet.git
synced 2025-12-29 08:26:39 +00:00
Prevent webpack from trying to include node fs
This commit is contained in:
parent
c6c79c05ca
commit
0e807587e1
@ -73,7 +73,8 @@ export async function asyncBufferFromUrl(url) {
|
||||
* @returns {Promise<AsyncBuffer>}
|
||||
*/
|
||||
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,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user