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

Issue with the AMD Module Pattern and AlmondJS #81

Closed
iamJoeTaylor opened this issue Oct 1, 2014 · 2 comments
Closed

Issue with the AMD Module Pattern and AlmondJS #81

iamJoeTaylor opened this issue Oct 1, 2014 · 2 comments

Comments

@iamJoeTaylor
Copy link

The standard build includes the AMD Pattern:

!function(a) {
    if ("function" == typeof define && define.amd)
        define(function() {
            return a(window)
        });
    else if ("object" == typeof module && "object" == typeof module.exports)
        module.exports = a(global);
    else {
        var b = window.Bugsnag;
        window.Bugsnag = a(window, b)
    }
}

This doesn't play well with AlmondJS which is expecting a name to be the first param. The error causes Bugsnag not to be added to the window at all.

Could we get different options to build with, as opposed to AMD by default?

jmshal added a commit to jacobmarshall-etc/bugsnag-js that referenced this issue Oct 1, 2014
@ConradIrwin
Copy link

Hi @iamJoeTaylor. This is for a few reasons, I just did some investigation.

The next version of bugsnag js should fix this for you (should be out tomorrow when I've done a little more testing), but in the meantime you can either:

  1. Load Bugsnag before your bundled requirejs stuff.
  2. Load Bugsnag using requirejs as described here (http://requirejs.org/docs/optimization.html#empty)

@iamJoeTaylor
Copy link
Author

Thanks @ConradIrwin

kattrali pushed a commit that referenced this issue Apr 22, 2021
refactor: Rename electron plugins and add unit tests
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

2 participants