Bundle does not works in browser due to missing externals
We understand you have a problem and are in a hurry, but please provide us with some info to make it much more likely for your issue to be understood, worked on and resolved quickly.
I'm trying to use referee in a browser environment, more specifically in karma. I'm loading the bundle version ('dist/referee.js') But it crashes because of missing dependencies in the bundle
- library version : "@sinonjs/referee": "^3.2.0"
- Environment : karma 4.x
- Example URL : https://github.com/blikblum/slick-router/blob/use-open-wc-testing/karma.conf.js#L10
- Other libraries you are using:
What did you expect to happen? referee bundle should work on browsers
What actually happens referee crashes on browser
How to reproduce
Describe with code how to reproduce the faulty behaviour, or link to code on JSBin or similar
Try to load bundle ('dist/referee.js') as a script on browser
This occurs because rollup does not bundle external dependencies by default. To do so is necessary to use 'rollup-plugin-node-resolve'
Let me know if a PR is accepted to make a bundle that works on browser
Thank you for reporting this. Before you create PR with changes, would you mind creating a minimal reproducible example? It could be as simple as using a codepen.
See https://codepen.io/blikblum/pen/bGNBdWz
I tried to add scripts for @sinonjs/commons and @sinonjs/formatio but they don't have dist / bundles
In fact i looked a bit more and the dependency graph is to big so making workable browser bundle may require an amount of work i can't provide.
👍
The mentioned plugin has been moved to https://github.com/rollup/plugins/tree/master/packages/node-resolve