Do you know of a workflow that includes source maps for an app compiled with grunt?
I am well aware of plugins like uglifyjs
that allow you to simply generate a source map. But I'm looking for incorporating this into a more complex workflow, rather than just making a one-off source map.
I've noticed that the most popular Yeoman generators (that I know of) are missing source maps in their workflows. Is this just because of a lack of support in the major plugins for source maps? Or is it instead that source maps aren't necessary in work flows, and I just can't think of a clever enough alternative?
Notable sources of trouble with popular grunt plugins that I've run into include:
uglify
being unable to handle even the most basic of project structures without a hacky fix.
usemin
also being unable to handle source maps beyond the simplest of configurations, in that it can really only support one per project (but still requires a hack to correct it). A possible solution is obviously to stop using usemin
altogether, but then you lose out on all of the benefits of it, like pairing it with rev
, watch
, and connect
.
I'm thinking that my best course of action might be testing with un-concatenated/not-minified sources when I'm testing my app. This is, of course, less than ideal, as I'd like my test environment to mirror the production one as best as possible.
Do you use source maps in your grunt project? How do you do it? If not, how do you get around the lack of support for them?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…