-
Notifications
You must be signed in to change notification settings - Fork 143
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
Amplitude and Madkudu integrations break with SystemJS #761
Comments
I've got the same issue for the bugsnag integration. What was your solution? |
Unfortunately, disabling the integrations... :( |
The fix should be as easy as changing the following lines:
in this way var umd = typeof window.define === 'function' && window.define.amd; to var umd = typeof window.define === 'function' && window.define.amd && window.require; |
Hey @robmosca, I think replacing var umd = typeof window.define === 'function' && window.define.amd; with var umd = typeof window.define === 'function' && window.define.amd && window.require; won't fix the issue.
I am looking at the SystemJS documentation in order to see how we can import MadKudu.js here. |
@GhassenRjab: the test on line 44 won't pass and MadKudu.js will instead be loaded via the traditional way (script element injection) at line 59. The test at line 44 is just to use RequireJS instead of load() (hence the return statement on line 56). Or maybe I misunderstand the code? 🤔 |
You're right! Nice catch! I'll open a PR with the suggested solution |
Yeah, I also tested it in Chrome overriding the code of the integration with the proposed change and it seems to work. 👍🏽 |
@robmosca the PR has been merged. I think a new version has been released |
When trying to initialize Amplitude Classic or Madkudu in a website using SystemJS, the initialization fails with the following message:
This is due to the fact that the condition on this line is true for SystemJS, but SystemJS does not define
window.require
(see here and here).Maybe to the condition on line 13 a check should be added for
window.require
to be defined.The text was updated successfully, but these errors were encountered: