Closed adriangohjw closed 4 days ago
@adriangohjw can you update spec/dummy app to use Shakapacker v8?
I can confirm this bug still exists, event though the associated PR has been closed. As a workaround until this is fixed, I've just put an initializer in my app that sets Webpacker
to Shakapacker
, as shown below:
# app/config/initializers/webpacker.rb
Webpacker = Shakapacker
I confirm @4-Eyes 's hack worked for me.
For the record, it looks like a fix was supposed to have be merged in https://github.com/shakacode/react_on_rails/pull/1629.
Environment
Ruby version: 3.3.1 Rails version: 7.1.3.2 Shakapacke version: 8.0.0 React on Rails version: 14.0.0
Expected behavior
Running
rails s
should start the server successfullyActual behavior
Facing this error and server refuse to start up
Details
Changing
Webpacker.config.shakapacker_precompile?
toShakapacker.config.shakapacker_precompile?
seem to fix the issue (on my end, at least)https://github.com/shakacode/react_on_rails/blob/36f342c6086718289e4d66d0eea2fbf1f6334a8d/lib/react_on_rails/configuration.rb#L258-L262