Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,9 @@ Save a change to a JSX file and see it update immediately in the browser! Note,

+ Note, the following view helpers do the magic to make this work:
```erb
<%= env_stylesheet_link_tag(static: 'application_static', hot: 'application_non_webpack', options: { media: 'all', 'data-turbolinks-track' => true }) %>
<%= env_stylesheet_link_tag(hot: 'application_non_webpack', options: { media: 'all', 'data-turbolinks-track' => true }) %>
<%= env_javascript_include_tag(hot: ['http://localhost:3500/vendor-bundle.js', 'http://localhost:3500/app-bundle.js']) %>
<%= env_javascript_include_tag(static: 'application_static', hot: 'application_non_webpack', options: { 'data-turbolinks-track' => true }) %>
<%= env_javascript_include_tag(hot: 'application_non_webpack', options: { 'data-turbolinks-track' => true }) %>
```

## Testing
Expand Down
2 changes: 1 addition & 1 deletion docs/jquery-with-react-on-rails.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

jQuery and jQuery-ujs are not required within `app/assets/javascript/application.js` and have been moved under`/client` and are managed by npm. The modules are exposed via entry point by [client/webpack.client.base.config.js](client/webpack.client.base.config.js) and, for `jquery-ujs`, in the [client/webpack.client.rails.build.config.js](client/webpack.client.rails.build.config.js) and the [client/webpack.client.rails.hot.config.js](client/webpack.client.rails.hot.config.js).

In `application_non_webpack.js` and `application_static.js.erb`, it's critical that any libraries that depend on jQuery come after the inclusion
In `application_non_webpack.js`, it's critical that any libraries that depend on jQuery come after the inclusion
of the Webpack bundle.

Please refer to [Considerations for jQuery with Rails and Webpack](http://forum.shakacode.com/t/considerations-for-jquery-with-rails-and-webpack/344) for further info.