Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
AbanoubGhadban committed Dec 18, 2024
1 parent 4600fbd commit b3c0a38
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
11 changes: 1 addition & 10 deletions lib/react_on_rails/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,21 +90,12 @@ def self.bundle_js_file_path(bundle_name)
else
# Default to the non-hashed name in the specified output directory, which, for legacy
# React on Rails, this is the output directory picked up by the asset pipeline.
# For Webpacker, this is the public output path defined in the webpacker.yml file.
# For Shakapacker, this is the public output path defined in the (shaka/web)packer.yml file.
File.join(generated_assets_full_path, bundle_name)
end
end

def self.server_bundle_js_file_path
# Either:
# 1. Using same bundle for both server and client, so server bundle will be hashed in manifest
# 2. Using a different bundle (different Webpack config), so file is not hashed, and
# bundle_js_path will throw so the default path is used without a hash.
# 3. The third option of having the server bundle hashed and a different configuration than
# the client bundle is not supported for 2 reasons:
# a. The webpack manifest plugin would have a race condition where the same manifest.json
# is edited by both the webpack-dev-server
# b. There is no good reason to hash the server bundle name.
return @server_bundle_path if @server_bundle_path && !Rails.env.development?

bundle_name = ReactOnRails.configuration.server_bundle_js_file
Expand Down
3 changes: 1 addition & 2 deletions node_package/src/ReactOnRails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,7 @@ ctx.ReactOnRails = {
},

/**
* Used by server rendering by Rails
* @param options
* Used by rsc payload generation by Rails
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars
serverRenderRSCReactComponent(options: RenderParams): PassThrough {
Expand Down

0 comments on commit b3c0a38

Please sign in to comment.