如何获得Rails资产管道以生成源地图? [英] How can I get the Rails asset pipeline to produce source maps?

查看:72
本文介绍了如何获得Rails资产管道以生成源地图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想让Rails在编译后的coffeescript/minified JS旁边生成源地图,以便更好地记录错误.但是,网上似乎还没有关于如何执行此操作的全面文档.有人做过吗?

I'd like to have Rails produce source maps alongside the compiled coffeescript/minified JS, for better error logging. There doesn't seem to be comprehensive documentation on the net on how to do this, yet, though. Has anyone done this?

我正在使用Rails 3.2和Heroku.

I'm on Rails 3.2 and Heroku.

推荐答案

Rails支持精简JavaScript的源映射! Rails依靠链轮进行资产编译,并且在

Rails supports source maps for minified JavaScript! Rails relies on Sprockets for asset compilation, and source maps support was added to Sprockets in this pull request.

这篇关于如何获得Rails资产管道以生成源地图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆