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

Add sourceMapURL and sourceMapRootpath options #238

Closed
donaldpipowitch opened this issue Jul 28, 2014 · 2 comments
Closed

Add sourceMapURL and sourceMapRootpath options #238

donaldpipowitch opened this issue Jul 28, 2014 · 2 comments

Comments

@donaldpipowitch
Copy link

It looks like grunt-contrib-uglifiy doesn't support the options sourceMapURL and sourceMapRootpath for generating source maps. This is a feature supported by grunt-contrib-less which is really handy.
E.g. I use two connect servers for development: one for the app itself and one to serve the source maps. (So my app can't accidentally get the source files. And I can use one source maps server for multiple versions of my app - like production and release version - as the source files are the same.)

It would be really nice if grunt-contrib-uglifiy could include these options. (It seems that uglifiy supports them internally? But I can't find a way to pass these options with this grunt plugin.)

Note: I made the same request for gruntjs/grunt-contrib-concat#92 (including some examples to show the difference).

@donaldpipowitch
Copy link
Author

FYI: It looks like UglifyJS has these options built-in: https://github.com/mishoo/UglifyJS2

@RReverser
Copy link
Contributor

👍

Please return sourceMapRoot. It's important to be able to customize it. For example, I used following configuration:

sourceMapRoot: (
  process.env.CI
  ? 'https://raw.github.com/'+process.env.TRAVIS_REPO_SLUG+'/'+process.env.TRAVIS_COMMIT
  : '../..'
)

This allows to build releases on CI differently so source maps point to sources at Github instead of local ones. And since sourceMapRoot is removed, this is no more possible.

RReverser added a commit to RReverser/grunt-contrib-uglify that referenced this issue Nov 18, 2014
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