Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bundle does not works in browser due to missing externals #160

Open
blikblum opened this issue Dec 15, 2019 · 4 comments
Open

Bundle does not works in browser due to missing externals #160

blikblum opened this issue Dec 15, 2019 · 4 comments

Comments

@blikblum
Copy link

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

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

@mroderick
Copy link
Member

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.

@blikblum
Copy link
Author

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.

@mroderick
Copy link
Member

👍

@mroderick
Copy link
Member

The mentioned plugin has been moved to https://github.com/rollup/plugins/tree/master/packages/node-resolve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants