shakacode / react_on_rails

Integration of React + Webpack + Rails + rails/webpacker including server-side rendering of React, enabling a better developer experience and faster client performance.
https://www.shakacode.com/react-on-rails/docs/
MIT License
5.08k stars 627 forks source link

Webpacker constants still being referenced #1603

Closed tomdracz closed 3 months ago

tomdracz commented 3 months ago

Related to: https://github.com/shakacode/shakapacker/pull/429#issuecomment-1981813624

In Shakapacker v7, we've deprecated usage of Webpacker naming. Looks like react-on-rails is still using this in some internals, namely https://github.com/shakacode/react_on_rails/blob/master/lib/react_on_rails/webpacker_utils.rb

Backwards compatibility here feels to be responsibility of this repo now so we should either migrate away completely from Webpacker to Shakapacker or provide some conditional support based on the version used. Maybe something as simple as:

if shakapacker_version < 7
  Shakapacker = Webpacker
end

But not too familiar with internals of react-on-rails to see what's the best course of action

justin808 commented 3 months ago

I think https://github.com/shakacode/react_on_rails/commit/f47e95eeffb92bb14c64022261be558dd692fb9d fixes this.