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

ember-data breaks all production sourcemaps #2871

Closed
ef4 opened this issue Mar 13, 2015 · 3 comments · Fixed by #2882
Closed

ember-data breaks all production sourcemaps #2871

ef4 opened this issue Mar 13, 2015 · 3 comments · Fixed by #2882
Milestone

Comments

@ef4
Copy link
Contributor

ef4 commented Mar 13, 2015

Any app that includes ember-data will end up with broken production sourcemaps, because ember-data.prod.js includes this sourcemap reference:

//# sourceMappingURL=ember-data.js.map

which points to a sourcemap file that's only valid for ember-data.js, the dev build. This attempt in ember-data's index.js to hide the dev sourcemap in production:

    this.app.import({
      development: app.bowerDirectory + '/ember-data/ember-data.js',
      production: app.bowerDirectory + '/ember-data/ember-data.prod.js'
    }, options);
    // Source maps
    this.app.import({
      development: app.bowerDirectory + '/ember-data/ember-data.js.map'
    }, {destDir: 'assets'});

does not work, because sourcemap files do not need to be imported explicitly, they are discovered via relative URLs.

ember-data needs to ship with a valid sourceMappingURL in ember-data.prod.js, or leave it off entirely. Pointing to an invalid file breaks the sourcemap for any file that appears in the vendor bundle later than ember-data.

@fivetanley
Copy link
Member

Seems like we should just remove it for production. I can hotfix this to the bower components repo but this should be removed in core until we can get it right (at least for production).

@fivetanley
Copy link
Member

I hotfixed this on the ember data components repo. I'll post in the other thread.

@fivetanley fivetanley added this to the 1.0.0-beta.16 milestone Mar 13, 2015
@bmac
Copy link
Member

bmac commented Mar 13, 2015

@fivetanley will this be fixed by using the ember build pipeline?

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

Successfully merging a pull request may close this issue.

3 participants