marionettejs / backbone.radio

Messaging patterns for Backbone applications.
MIT License
491 stars 50 forks source link

Backbone.Radio cannot be resolved by rollup-plugin-commonjs #271

Closed noonien closed 7 years ago

noonien commented 7 years ago

I'm using rollup with with rollup-plugin-bower-resolve with rollup-plugin-commonjs to resolve runtime dependencies, and it works just fine for other dependencies.

However, importing 'backbone.radio' results in the following error:

'backbone.radio' is imported by app/app.js, but could not be resolved – treating it as an external dependency
No name was provided for external module 'backbone.radio' in options.globals – guessing 'br'
paulfalgout commented 7 years ago

I think you need to use a custom named export https://github.com/rollup/rollup-plugin-commonjs#custom-named-exports

noonien commented 7 years ago

Oh, it would appear to be my bad, backbone.radio was not saved to my bower.json, and I think that's what caused the issue.

Adding it there solved the problem.

Thanks!