3 ms·
How do you deal with minified JS (which is what you normally have in production)?
by rorrr 14y ago
How do you deal with minified JS (which is what you normally have in production)?
- jabo 14y agoThey mention that they use source maps (http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/ http://www.html5rocks.com/en/tutorials/developertools/source...) at the bottom of the page.
- rorrr 14y agoOuch. Looks pretty complex. Has anybody here tried it? Any feedback?
- benregenspan 14y agoIf your minifier/obfuscator supports creation of source maps, it's simple. You just need to set a flag to tell it to create the map along with minified JS and you're good to go. UglifyJS2 and Closure Compiler are among those that can create a source map.
- cirwin 14y agoAs other commenters have mentioned, Source Maps are the solution to this problem in general. The main reason we don't yet allow signup to RescueJS is that "create a source map" is currently beyond the state of the art for web frameworks. You can't "just" do it. Over the weekend we spent a few hours trying to hook source maps into the asset pipeline for Rails based on https://github.com/sstephenson/sprockets/pull/311 https://github.com/sstephenson/sprockets/pull/311 and upgrading the 'uglifier' rubygem to work with UglifyJS2. We didn't manage to get it quite working within the time limit, but we'll try and push our work-in-progress upstream to get this ball moving again.