Rails 3.1 Pipeline - Exclude Javascript File

前端 未结 4 1177
醉话见心
醉话见心 2020-12-05 06:48

I want to exclude a particular javascript file (modernizr) from the pipeline because I want it to load separately.

I want to load Modernizr at the beginning and th

4条回答
  •  既然无缘
    2020-12-05 07:29

    These answers are outdated. Just move active_admin.css.scss from app/assets/stylesheets to vendor/assets/stylesheets.

    Do the same with active_admin.js.coffee (move from app/assets/javascripts to vendor/assets/javascripts).

    Your assets will then be loaded when needed, and you won't have to make modifications to applications.js to accommodate active_admin.

    This solution is described in this issue. Hope this helps.

提交回复
热议问题