Can't get it working with my current React form
my config as below: require.config({ paths: { ... 'react-onclickoutside': '/node_modules/react-onclickoutside/dist/react-onclickoutside.min', 'react-datepicker': '/node_modules/react-datepicker/lib/index', })
Firstly, it complains an error: Module name 'react-onclickoutside' has not been loaded yet for context: _.
In the index.js file update
var onClickOutside = _interopDefault(require('react-onclickoutside'));
To
var onClickOutside = _interopDefault(require(['react-onclickoutside']));
Fixed that issue. But then complains 'module' undefined.
update module.exports = DatePicker; to define(function (exports, module) { module.exports = DatePicker; });
Then still complain require.js with Uncaught TypeError: a.slice is not a function ...
Does it has to go with webpack? We haven't got webpach yet...
It drives me crazy. Did I miss something or did something wrong? The example works fine, however the react-datepicker.js code is so different with the one in the example folder.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.