Skip to content

Latest commit

 

History

History
30 lines (23 loc) · 1.09 KB

upgrading-your-manifest-for-sprockets-4.md

File metadata and controls

30 lines (23 loc) · 1.09 KB

Upgrading Your Manifest For Sprocket's 4

If you're upgrading Rails and it involves bumping the Sprockets dependency from 3.x to 4.x, you may need to update your manifest.js.

Since the default logic for determining top-level targets changed, you might find some files that were currently compiled by sprockets for delivery to browser no longer are. You will have to edit the manifest.js to specify those files.

The manifest.js file is meant to specify what files to use as a top-level target using sprockets methods link, link_directory, and link_tree.

You can specify what top-level assets like so:

# app/assets/config/manifest.js

//= link_tree ../images
//= link_directory ../javascripts .js
//= link_directory ../stylesheets .css
//= link some_file.xml
//= link some/nested/style.css

Read more about the upgrade process here as well as in this blog post.