Skip to content

Remove application_static from docs due to Webpacker changes #411

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
wants to merge 1 commit into from
Closed

Remove application_static from docs due to Webpacker changes #411

wants to merge 1 commit into from

Conversation

rnice01
Copy link

@rnice01 rnice01 commented Jul 22, 2017

This change is Reviewable

@justin808
Copy link
Member

Some comments.


Reviewed 2 of 2 files at r1.
Review status: all files reviewed at latest revision, 2 unresolved discussions, some commit checks broke.


README.md, line 197 at r1 (raw file):

  <%= env_stylesheet_link_tag(static: 'application_static', 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 }) %>

These changes are simply not right.

We don't use the env_XXXX helper tags with Webpacker Lite.

Please see what the default generator creates, what's in spec/dummy and the https://github.com/shakacode/react-webpack-rails-tutorial.


docs/jquery-with-react-on-rails.md, line 5 at r1 (raw file):

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`, it's critical that any libraries that depend on jQuery come after the inclusion

The important point about this one is that any JS files loaded on the HTML come after the webpack libraries are loaded. This needs to be considered in the context of any "defer" usage for the webpack bundles.


Comments from Reviewable

@justin808
Copy link
Member

@rnice01 have you had a chance to consider the suggestions?

@justin808
Copy link
Member

@rnice01 any update?

1 similar comment
@justin808
Copy link
Member

@rnice01 any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants