Answer the question
In order to leave comments, you need to log in
Reactjs plugins and requirejs how?
Hello. I use Backbone, React, requirejs. Everything was fine until I started installing plugins like react-telephone-input or react-onlickoutside mixin. I'm catching errors like plugins not being wrapped in the appropriate
define(function(require){/* not interesting details */});
but just
var foo = require('bar');
more precisely , requirejs.org/docs/errors.html#notloaded - it says there that you need to turn this thing around. Do not rewrite plugins, right? Who is struggling with this? Another aspect, I use bower, not npm, and thus, when I install a package with dependencies, it is somewhat more difficult for me to deal with this dependency hive. When I looked at the plugin sources, I saw lines like
var map = require('lodash/collections/map');
If you install via npm - everything turns out like that, except for the wrapper, and with bower - everything comes in one file. Thanks in advance to everyone for your kindness.
Answer the question
In order to leave comments, you need to log in
Do not rewrite plugins, right? Who is struggling with this?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question