This project has moved. For the latest updates, please go here.

SourceMap Generation

Feb 27, 2015 at 3:37 PM
Hi,

I have started to use BundleTransformer in production and it's really great (I am using the uglifyjs transformer).


It's is a great product, but it really lack the sourcemap generation, which is really handy for production debugging of javascript files.

I have researched the options for doing this in asp.net (and created a prototype for this):
  1. Write the source map to the file system
  2. Write sourcemap as base64 and inline it (using gzip, it's ok for transfer size)
I have read - https://bundletransformer.codeplex.com/discussions/472034# , and I don't understand why not to support this feature (which is supported in every modern javascript building tool but not in .NET building tools).

I can help implement this and send contribution.
  • Yosi
Coordinator
Feb 27, 2015 at 5:17 PM
Hello, Yosi!

I'm tired of answering this question.

This feature cannot be implemented in the Bundle Transformer. I already many times wrote about this in the discussions: "how do I turn on Less source maps?" and "MicrosoftAjaxJsMinifier .map file configuration".
I can help implement this and send contribution.
Implementation of source map generation in BundleTransformer.UglifyJs is not a solution to the problem. Processing of source maps must be implemented at all levels of the Bundle Transformer pipeline, at the moment this is not possible (at least because BundleTransformer.TypeScript and BundleTransformer.CoffeeScript doesn't support generation of source maps).
I don't understand why not to support this feature (which is supported in every modern javascript building tool but not in .NET building tools).
Bundle Transformer and the Microsoft ASP.NET Web Optimization Framework is no longer modern tools: https://github.com/aspnet/KRuntime/issues/238 and https://github.com/aspnet/Home/issues/134. Use a modern building tools. Now there are a lot of information on this theme:
  1. Introducing Gulp, Grunt, Bower, and npm support for Visual Studio
  2. Grunt and Gulp Intellisense in Visual Studio 2013
  3. Modern Web Tooling in Visual Studio 2015
  4. Manage Client-Side Web Development in Visual Studio 2015, Using Grunt and Bower
  5. An introduction to Gulp
  6. Add Grunt and Bower to Visual Studio projects
  7. Grunt and Gulp Intellisense in Web Essentials 2015
Feb 27, 2015 at 7:04 PM
Hi Taritsyn,

Thank you for you details answer, I think you should write this in the wiki about the sourcemap generation.