Skip to content
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

Webpacker: support javascript_packs_with_chunks_tag #31

Open
DanielHeath opened this issue Jul 10, 2019 · 1 comment
Open

Webpacker: support javascript_packs_with_chunks_tag #31

DanielHeath opened this issue Jul 10, 2019 · 1 comment

Comments

@DanielHeath
Copy link

Webpacker in rails 5.2 adds javascript_packs_with_chunks_tag, which calls send_early_hints, which isn't implemented here.

Workaround:

  class RenderingController < RenderAnywhere::RenderingController
    def request
      r = super
      def r.send_early_hints(links)
      end
      r
    end
  end
@giangth94
Copy link

thanks @DanielHeath for suggesting a workaround, we encountered the same issue on Rails 5.2

ActionView::Template::Error
undefined method `send_early_hints' for #<OpenStruct>
NoMethodError
undefined method `send_early_hints' for #<OpenStruct>

Adding the workaround as a module under lib folder then include it in the code where we use javascript tag resolves the issue

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

No branches or pull requests

2 participants