#18341 closed feature (fixed)
Add support for source maps with UglifyJS 2 optimizer
Reported by: | Thomas Bachem | Owned by: | ben hockey |
---|---|---|---|
Priority: | high | Milestone: | 1.10.3 |
Component: | BuildSystem | Version: | 1.10.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
UglifyJS has been added as a build optimizer thru #14684, but source maps are not yet supported. UglifyJS 2 is stable and supports source maps, so it would be nice if the Dojo build scripts would make use of them.
Change History (9)
comment:1 Changed 6 years ago by
Owner: | set to Thomas Bachem |
---|---|
Status: | new → pending |
comment:2 Changed 6 years ago by
Status: | pending → new |
---|
Great, thanks for the info! I don't get how to implement it though.
I'm currently calling
node build.js --profile build.profile.js --releaseDir ... --optimize uglify --layerOptimize uglify --stripConsole all --cssOptimize comments
Now I want a ".js.map" file for every built Javascript file, so I thought of putting this in my build.profile.js:
optimizeOptions: { compress_options: {}, gen_options: { source_map: UglifyJS.SourceMap() } }
But this feels strange and leads to "error(347) Failed to evaluate profile file. profile: build.profile.js; error: ReferenceError?: UglifyJS is not defined".
I guess I'm probably doing it totally wrong.
comment:3 Changed 6 years ago by
Owner: | changed from Thomas Bachem to ben hockey |
---|---|
Status: | new → assigned |
ok, i may have spoke too soon. let me work on something and see if i can get a pull request - i think there may need to be some extra support added.
comment:5 Changed 6 years ago by
Milestone: | tbd → 1.11 |
---|---|
Priority: | undecided → high |
i've opened https://github.com/dojo/util/pull/24
if you have time to try it out, i'd like to get feedback.
comment:6 Changed 6 years ago by
That's fantastic! Works well, thank you so much for this quick resolution!
comment:7 Changed 6 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:9 Changed 6 years ago by
Milestone: | 1.11 → 1.10.3 |
---|
this is already supported. add something like the following to your build profile.
is there something more than this which you need?