I'm trying to use the library in my electron project (compiled with webpack, target set to electron-renderer), but it seems that the node module is being imported instead of browser-ready-wrapped one – as calling musicmetadata(file, (e, data) => {...}) (where file is a File object) ends up with TypeError: stream.pipe is not a function.
Is this intentional? Or could the library be altered to be served as browser module for this environment? Or eventually, could this be achieved by some webpack.config.js tricks (not a webpack heavy user)?
I'm trying to use the library in my electron project (compiled with webpack, target set to
electron-renderer
), but it seems that the node module is being imported instead of browser-ready-wrapped one – as callingmusicmetadata(file, (e, data) => {...})
(wherefile
is aFile
object) ends up withTypeError: stream.pipe is not a function
.Is this intentional? Or could the library be altered to be served as browser module for this environment? Or eventually, could this be achieved by some webpack.config.js tricks (not a webpack heavy user)?