Closed barrymichaeldoyle closed 4 years ago
Due to the dependency on fs
, this module is not isomorphic; it cannot be run in a browser.
The parse
function can be run in the browser because it doesn't depend on fs
, but you need to modify the module yourself:
eml-format.js
.fs
: emlformat.unpack
.eml-format.js
instead of this module.It would be nice if the underlying parser was exposed as it's own module without the fs
dependency.
@pl12133 thanks for providing the answer.
The fs
dependency has been moved inside the unpack
function. Thus, the parse
and other functions should now be available when running the script in a browser.
Updated with version 0.6.0.
After added this mailparser package to my project I get the following error:
I've been trying various fixes but one fix just leads to another. How do I get around this issue?