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

Dependencies on plugins #15

Open
Rich-Harris opened this issue Aug 9, 2014 · 0 comments
Open

Dependencies on plugins #15

Rich-Harris opened this issue Aug 9, 2014 · 0 comments

Comments

@Rich-Harris
Copy link
Member

In an AMD/CommonJS context, this makes sense (to make the custom tap event available to the component):

require('ractive-events-tap');

But ractive-load will look for Ractive.load.modules['ractive-events-tap'], and then window['ractive-events-tap'], and then (having found neither) throw an error.

A workaround is to do Ractive.load.modules['ractive-events-tap'] = Ractive.events.tap, but that sucks.

Options:

  1. Disregard any dependencies that match the pattern /^ractive-/. Ractive will print a warning when it tries to use the plugin and finds it missing.
  2. Don't throw an error, just carry on. Would make debugging harder in other situations (e.g. if you did THREE = require('three'), you wouldn't realise that for modules with a name/exports mismatch, you need to alias them with Ractive.load.modules.three = THREE;
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

1 participant