Open maoberlehner opened 6 years ago
// some/file.js import xhr from 'xhr-mocklet'; // ...
rollup some/file.js --o dist/some/file.js --f iife -c rollup.config.js
[!] Error: Cannot call a namespace ('ee') node_modules/xhr-mocklet/lib/es/MockXMLHttpRequestUpload.js (4:23)
// rollup.config.js import commonjs from 'rollup-plugin-commonjs'; import resolve from 'rollup-plugin-node-resolve'; import uglify from 'rollup-plugin-uglify'; export default { plugins: [ resolve(), commonjs(), uglify(), ], };
Btw. you write Utility for mocking XMLHttpRequests both in the browser and nodejs – after looking at the code, I can't imagine how this could work in the browser – see: https://github.com/marvinhagemeister/xhr-mocklet/issues/9
Utility for mocking XMLHttpRequests both in the browser and nodejs
I was hoping for a lightweight alternative to nise but currently this does not work for me (bundling for the browser).
nise
@maoberlehner Thanks for checking out xhr-mocklet. It has indeed a few rough spots that can be improved. I'm happy to review any PRs you have in store 👍
xhr-mocklet
Btw. you write
Utility for mocking XMLHttpRequests both in the browser and nodejs
– after looking at the code, I can't imagine how this could work in the browser – see: https://github.com/marvinhagemeister/xhr-mocklet/issues/9I was hoping for a lightweight alternative to
nise
but currently this does not work for me (bundling for the browser).