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

Fastboot Issues due to jQuery dependency #39

Open
mazondo opened this issue Jul 16, 2017 · 3 comments
Open

Fastboot Issues due to jQuery dependency #39

mazondo opened this issue Jul 16, 2017 · 3 comments

Comments

@mazondo
Copy link
Contributor

mazondo commented Jul 16, 2017

We're having an issue with FastBoot since this plugin relies on jQuery to read the revision version.

I've supressed the error with a custom service like this:

import RavenService from 'ember-cli-sentry/services/raven';
import computed from 'ember-computed';
import $ from 'jquery';

export default RavenService.extend({
    releaseMetaName: 'sentry:revision',
    release: computed('releaseMetaName', {
        get: function() {
          if (typeof(FastBoot) === 'undefined') {
            return $(`meta[name='${this.get('releaseMetaName')}']`).attr('content');
          }
        }
    })
});

But this basically just means that fastboot errors will have no version. Anyone have ideas on a better way to handle this?

@mazondo mazondo changed the title Fastboot Issues Fastboot Issues due to jQuery dependency Jul 16, 2017
@duizendnegen
Copy link
Collaborator

The release attribute is calculated so late and injected in index.html because we can't write it to environment.js before (since environment.js gets compiled and included in the hashing operation).
Alternatively you could write a version.json file or so in Fastboot mode, after the build hook, and write the version data in there. Would that help?

@mazondo
Copy link
Contributor Author

mazondo commented Jul 18, 2017 via email

@duizendnegen
Copy link
Collaborator

We could totally use that as a release version, I'd be super happy to get rid of the meta hack. @dschmidt see any problems?
Welcoming a PR.

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