Open mikinty opened 3 years ago
If anyone is trying to use this package with webpack, you might get some errors like
ERROR in ./node_modules/request/lib/har.js Module not found: Error: Can't resolve 'fs' in '...\node_modules\request\lib'
I think the error has to do with something Node specific and browsers not supporting Node's full capabilities.
A fix I found was to add the following to your webpack.config.js:
webpack.config.js
module.exports = { node: { fs: 'empty', net: 'empty', tls: 'empty' } }
I'm actually not exactly sure what this does, but I'm assuming it just removes the need for these packages in the final bundle.
Unsure if this is the proper way to go about bundling this package in browser apps.
I still run into #34 CORS issues after getting this bundle to compile.
If anyone is trying to use this package with webpack, you might get some errors like
I think the error has to do with something Node specific and browsers not supporting Node's full capabilities.
A fix I found was to add the following to your
webpack.config.js
:I'm actually not exactly sure what this does, but I'm assuming it just removes the need for these packages in the final bundle.
Unsure if this is the proper way to go about bundling this package in browser apps.
I still run into #34 CORS issues after getting this bundle to compile.