Skip to content

rails 6 (sprockets 4) asset changes #97

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,19 @@ Include CSS stylesheets in `app/assets/stylesheets/application.css`.
*= require_tree .
*/
```
#### For Rails 6 (Sprockets 4)
Rails changed its default logic for determining top-level targets. It now uses only a file at `./app/assets/config/manifest.js` for specifying top-level targets. This file may already exist in your Rails app (although Rails only starts automatically using it once you are using sprockets 4).

Since the default logic for determining top-level targets changed, you will have to edit the `manifest.js` to specify `grape-swagger-rails` asset files.

Add the following lines at top of `./app/assets/config/manifest.js`

```javascript
//= link grape_swagger_rails/application.css
//= link grape_swagger_rails/application.js
```

See [sprockets changelog](https://github.com/rails/sprockets/blob/master/UPGRADING.md#manifestjs) for more information.

## Contributors

Expand Down