Open ygoe opened 6 years ago
@ygoe : I think the actual issue is that the generated source map does not contain information about the original files. If it would, then you could also use the minified bundle for debugging. There's no real need for the non-minified bundle when you have source maps. Browsers (e.g. chrome) will display each original file in the minified bundle when the source map contains such information. In the case of BundlerMinifier the source maps just do not contain that information.
I added a new issue, because I'm currently facing the same problem: https://github.com/madskristensen/BundlerMinifier/issues/338
.. and I actually am giving up on BundlerMinifier for anything other than bundling or just copying files. I have an ASP.NET MVC 5 project where using the old ScriptBundle is still the only working solution for me.
@Casimodo72 Yes, I'm also on my way to give up VS-integrated tools for web compilation things and use my own GUI tool for that. It watches for file modifications and also works for PHP web projects outside of Visual Studio and has all the standard npm-based tools under the cover.
@ygoe : I think I was just too naive (again). MS promotes BundlerMinifier as the default choice for e.g. ASP.Core projects (see https://docs.microsoft.com/en-us/aspnet/core/client-side/bundling-and-minification?tabs=visual-studio%2Caspnetcore2x) Would there be a warning on that page reading "But you can't debug projects with lots of files in browsers with it, because our source maps do not support that, and btw you can't use ES6", then I wouldn't have spent the last two days looking into it :-(
The BundlerMinifier seems to work for the scenarios the MS devs themselves are in (e.g. development using TypeScript). And I guess @madskristensen is hoping for the community to jump in when he doesn't answer/react on issues for long enough ;-) Or maybe he just has too many projects laying around.
@Casimodo72 I think I spent a bit more time in finding a working JavaScript toolchain that takes modern JavaScript and produces something that today's browsers can run and debug. Seems the entire ecosystem isn't prepared for that. I already came to the conclusion that JavaScript isn't that much of a mature development environment that provides the productivity we're used to have in Visual Studio. Not much has changed since I last did major work in JavaScript many years ago. The tools can only properly handle full Js projects with nothing else, probably Node.js. But the front-end developer doesn't get much here. I'm planning on publishing my GUI tool but it isn't there yet. I also need to get the license stuff of the embedded npm modules right. (Also MIT wants to be properly documented.)
Installed product versions
Description
It's already described in the intro but there's no issue tracking it. I'm writing a bigger JavaScript library distributed over several files and bundle them into one that I use in my website. The minified version is only used for production, the unminified bundle for debugging. But any JavaScript error messages in the browser are reported in the bundled file. I'll first have to go look up the line there and figure out in what source file I must fix it.
So source maps should also be generated for unminified JavaScript files. This already works fine for the Web Compiler extension and Sass to CSS compilation. The browser tells me where in which .scss file the problem is. Just not for .js files.
Btw, is there any work going on in this project? I see lots of open issues, some of them bugs, from years ago, with no resolution. I'm a bit worried that this is an extension I can count on for my projects.