You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for writing a great plugin that's been super helpful so far. One issue I just ran into is that the plugin does not work when used in a require JS / AMD environment. Below is the require block in require_config:
I get a moment is not defined error. If I throw in a require call or a timer that waits for the moment variable in the plugin file it all works. Would it be possible to add amd support to the code?
The text was updated successfully, but these errors were encountered:
Is there any resource on how to develop a proper module, especially a moment plugin? This plugin was developed by @kalmecak a while ago i think, back then there weren't well defined formats I think. On a personal level I would be quite interested in this specification
You can just add a shim to your requirejs config. This solution assumes you already have momentjs added as an AMD module. If you don't you'll need to add a path for it to your requirejs config.
Thanks for writing a great plugin that's been super helpful so far. One issue I just ran into is that the plugin does not work when used in a require JS / AMD environment. Below is the require block in require_config:
define('moment',['moment/2.24.0/moment.min', 'moment/plugins/business-days/plugin'],function (moment) { window.moment = moment; return moment; });
I get a moment is not defined error. If I throw in a require call or a timer that waits for the moment variable in the plugin file it all works. Would it be possible to add amd support to the code?
The text was updated successfully, but these errors were encountered: