How to override single files from gem assets for assets:precompile?

前端 未结 2 1521
挽巷
挽巷 2021-02-13 16:41

Situation

I use a gem that brings its own JavaScript and stylesheet assets. This gem uses a standard application.js and application.css manifest to require all its ass

2条回答
  •  醉梦人生
    2021-02-13 17:03

    In application.rb or production.rb, you can prepend or append more assets path.

    config.assets.prepend_path 'vendor/assets/jquery'
    config.assets.append_path 'vendor/assets/something'
    

    References:

    • sprockets/railtie source code
    • Sprockets: Manipulating the Load Path

提交回复
热议问题