Skip to content

Does react-rails support the latest version of Shakapacker/Webpacker? #1157

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
aschneit opened this issue Jan 31, 2022 · 5 comments
Closed

Comments

@aschneit
Copy link

Does react-rails support the latest version of Shakapacker/Webpacker (v6)? Thanks.

@justin808
Copy link
Collaborator

@aschneit can you give it a try? I see no reason that it wouldn't.

@scraton
Copy link
Contributor

scraton commented Feb 22, 2022

Unfortunately, if you replace webpacker with shakapacker, this line no longer works:

      begin
        MAJOR, MINOR, PATCH, _ = Bundler.locked_gems.specs.find { |gem_spec| gem_spec.name == 'webpacker' }.version.segments
      rescue
        MAJOR, MINOR, PATCH, _ = [0,0,0]
      end

So you would be unable to use server side rendering with shakapacker. This MAJOR, MINOR check will need to also consider if shakapacker is installed rather than webpacker.

I'm not sure the best way forward to handle that. Perhaps check for shakapacker within the rescue block? Or provide another class, specifically for shakapacker (even though their APIs are currently identical)?

EDIT: Doi, or just evaluate gem_spec.name, checking for either 'webpacker' or 'shakapacker'. That should work.

@BookOfGreg
Copy link
Member

On Master it should now, next release gem will when that happens. Will leave issue open until then.

@justin808
Copy link
Collaborator

@BookOfGreg I'd like to get a release shipped ASAP.

What's the process so that I can ship?

@justin808 justin808 added this to the 2.7 milestone Oct 19, 2022
@ahangarha
Copy link
Collaborator

ahangarha commented Apr 25, 2023

React-Rails works fine with Shakapacker 6.
With #1252 #1274 (for version 3) there should be no missing supported feature.

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

5 participants