react_on_rails icon indicating copy to clipboard operation
react_on_rails copied to clipboard

config.build_production_command as module cannot be used if using rails/webpacker for compiling

Open justin808 opened this issue 4 years ago • 0 comments

config.build_production_command cannot be used to compile the rails/webpacker way since

https://github.com/shakacode/react_on_rails/blob/master/lib/tasks/assets.rake#L10

unless ReactOnRails::WebpackerUtils.webpacker_webpack_production_config_exists?

The fix should be that if you want to define a custom module for building, that's OK and takes precedence. Otherwise, use the rails/webpacker build or a custom string.

Without this, production bundle caching won't work with rails/webpacker compilation.

justin808 avatar May 11 '21 08:05 justin808