> I think the real mistake in that scenario is not minifying the code until "in production". You should minify your code from the day one.
How are you debugging minified code?
That's a big problem. Firefox and Chrome these days support debugging source mapped files. However, I'm running through two source map steps: TypeScript to JavaScript and JavaScript to minified JavaScript. For whatever reason the browser debuggers don't work that well with this setup. They're buggy and make the browser very slow. I often do have to resort to "console.log" debugging. On the plus side I'm always running code like it's run in "production", which will make it easier to catch any bugs resulting from minifying.
I use Webpack with a similar setup (CoffeeScript->JavaScript->Minified) and I didn't notice any issues. Source maps stop working when using Webpack's hot code reloading, but it's a price I'm willing to pay.
Re:Mistakes AngularJS Developers Make
by grumblestumble on Friday October 03, 2014 @06:25PM
(#8407971)
sourcemaps?
I think the real mistake in that scenario is not minifying the code until "in production". You should minify your code from the day one.
Although I agree that the "not safe for minifying" mechanism shouldn't have been included in AngularJS.
On the other (other) hand, it's pretty abhorrent that minifying is something that developers need to actually place any thought into..