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

Support publicPath and hidden-source-map #125

Closed
astronomersiva opened this issue Feb 14, 2019 · 4 comments
Closed

Support publicPath and hidden-source-map #125

astronomersiva opened this issue Feb 14, 2019 · 4 comments

Comments

@astronomersiva
Copy link
Contributor

webpack supports a variety of options for source maps, which we could bring to the Ember community as well. Two of them that I feel can be useful are:

publicPath: The value will be prepended to the value of sourceMappingURL. So, for a value of https://my-vpn/, the generated sourceMappingURL will be, //# sourceMappingURL=https://my-vpn/app.map. Implementing this should be as simple as prepending the value of publicPath to url here.

hidden-source-map: Using this option will prevent the reference to the source map from being added to the minified asset. The source maps can be separately uploaded to a private server and then loaded using the "Add Source Map..." option in Chrome. To implement this, we would just have to stop passing the url option to terser.

Further Reading

@rwjblue
Copy link
Member

rwjblue commented Feb 16, 2019

Seems good to me...

@astronomersiva
Copy link
Contributor Author

Raised #126 to address this.

@astronomersiva
Copy link
Contributor Author

@Turbo87, thanks for merging!

Could you also release a new version of ember-cli-uglify? The latest release on the registry v2.1.0 depends on broccoli-uglify-sourcemap@^2.1.1. I see that the PR to update this to v3 was merged but hasn't been released yet.

@Turbo87
Copy link
Member

Turbo87 commented Apr 6, 2019

@astronomersiva thanks for reminding me. I'll release once ember-cli/ember-cli-terser#102 is merged in as well, to prevent us from having to do yet another major version bump at the end of the month.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants