Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .controlplane/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ ENTRYPOINT ["./.controlplane/entrypoint.sh"]

# Default args to pass to the entry point that can be overridden
# For Kubernetes and ControlPlane, these are the "workload args"
CMD ["./bin/rails", "server"]
CMD ["./bin/rails", "server", "--early-hints"]
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby "3.4.6"

gem "react_on_rails", "16.1.1"
gem "shakapacker", "9.3.0.beta.2"
gem "shakapacker", github: "shakacode/shakapacker", branch: "justin808/early-hints"

# Bundle edge Rails instead: gem "rails", github: "rails/rails"
gem "listen"
Expand Down
22 changes: 14 additions & 8 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
GIT
remote: https://github.com/shakacode/shakapacker.git
revision: 915edce51481bb1135853f9b877fd243623a9820
branch: justin808/early-hints
specs:
shakapacker (9.3.0.beta.2)
activesupport (>= 5.2)
package_json
rack-proxy (>= 0.6.1)
railties (>= 5.2)
semantic_range (>= 2.3.0)

GEM
remote: https://rubygems.org/
specs:
Expand Down Expand Up @@ -386,12 +398,6 @@ GEM
websocket (~> 1.0)
semantic_range (3.1.0)
sexp_processor (4.17.1)
shakapacker (9.3.0.beta.2)
activesupport (>= 5.2)
package_json
rack-proxy (>= 0.6.1)
railties (>= 5.2)
semantic_range (>= 2.3.0)
simplecov (0.21.2)
docile (~> 1.1)
simplecov-html (~> 0.11)
Expand Down Expand Up @@ -496,7 +502,7 @@ DEPENDENCIES
scss_lint
sdoc
selenium-webdriver (~> 4)
shakapacker (= 9.3.0.beta.2)
shakapacker!
spring
spring-commands-rspec
stimulus-rails (~> 1.3)
Expand All @@ -505,7 +511,7 @@ DEPENDENCIES
web-console

RUBY VERSION
ruby 3.4.6p32
ruby 3.4.6p54

BUNDLED WITH
2.4.17
2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
web: bundle exec puma -C config/puma.rb
web: bundle exec puma -C config/puma.rb --early-hints
2 changes: 1 addition & 1 deletion Procfile.dev-prod-assets
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# You can run these commands in separate shells
web: bin/rails s -p 3001
web: bin/rails s -p 3001 --early-hints
redis: redis-server

# Next line runs a watch process with webpack to compile the changed files.
Expand Down
5 changes: 5 additions & 0 deletions config/shakapacker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,8 @@ production:

# Cache manifest.json for performance
cache_manifest: true

# Early hints configuration
early_hints:
enabled: true
debug: true # Outputs debug info as HTML comments
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"homepage": "https://github.com/shakacode/react-webpack-rails-tutorial",
"scripts": {
"postinstall": "patch-package",
"postinstall": "patch-package && if [ -f node_modules/shakapacker/package/index.ts ] && [ ! -f node_modules/shakapacker/package/index.js ]; then cd node_modules/shakapacker && yarn install --production=false && yarn build; fi",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Postinstall script uses Unix shell syntax; will not work on Windows.

The postinstall script uses bash conditionals and Unix paths that will fail on Windows systems (even with Git Bash). If this project supports Windows developers, this needs a cross-platform solution (e.g., using Node.js scripts or a cross-platform shell runner like cross-env).

Consider refactoring this into a Node.js script or using a tool like node-shell-script or platform-specific fallbacks. Alternatively, document that Windows developers must use WSL.

"res:clean": "rescript clean",
"res:format": "rescript format -all",
"res:dev": "yarn res:clean && rescript build -w",
Expand Down Expand Up @@ -92,7 +92,7 @@
"sass": "^1.58.3",
"sass-loader": "^13.3.2",
"sass-resources-loader": "^2.2.5",
"shakapacker": "9.3.0-beta.2",
"shakapacker": "github:shakacode/shakapacker#justin808/early-hints",
"stimulus": "^3.0.1",
"style-loader": "^3.3.1",
"swc-loader": "^0.2.6",
Expand Down
2,665 changes: 1,338 additions & 1,327 deletions yarn.lock

Large diffs are not rendered by default.