dbashford / textract

node.js module for extracting text from html, pdf, doc, docx, xls, xlsx, csv, pptx, png, jpg, gif, rtf and more!
MIT License
1.64k stars 186 forks source link

Webpack Support #155

Open perevernihata opened 6 years ago

perevernihata commented 6 years ago

It is not possible to use this module with webpack bundle. Textract tries to fs.readdirSync and dynamically import modules, but since package is bundled no modules are found. https://github.com/dbashford/textract/blob/e5ef131dba562aac8dcf740a8d6afa1aa6c11121/lib/extract.js#L74 Is it possible to avoid import during run-time?

dbashford commented 6 years ago

👍

I need to double back and fix a few last things and get the next version released. I can take a look at this at the same time.

kaaloo commented 4 years ago

Fixing this would be great. I'm seeing this when using zeit ncc in my build.