From aef779a59c69d20696206a9cb69dc5e0ba6e3ef1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Tue, 29 Apr 2025 17:11:21 +0400 Subject: [PATCH] Switch from Sprockets to Propshaft --- .gitignore | 1 + Gemfile | 4 ++-- Gemfile.lock | 15 ++++++--------- app/assets/config/manifest.js | 4 ---- 4 files changed, 9 insertions(+), 15 deletions(-) delete mode 100644 app/assets/config/manifest.js diff --git a/.gitignore b/.gitignore index 7cd5a78..fbb9edb 100644 --- a/.gitignore +++ b/.gitignore @@ -37,6 +37,7 @@ /yarn-error.log yarn-debug.log* .yarn-integrity +bun.lock # Ignore local dotenv config file .env diff --git a/Gemfile b/Gemfile index a80e317..3df7884 100644 --- a/Gemfile +++ b/Gemfile @@ -7,8 +7,8 @@ gem 'rails', '~> 8.0' gem 'puma', '~> 4.1' # View components gem "view_component" -# Separate dependency since Rails 7.0 -gem 'sprockets-rails' +# Asset bundler +gem 'propshaft' # Allows custom JS build tasks to integrate with the asset pipeline gem 'cssbundling-rails' # Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails] diff --git a/Gemfile.lock b/Gemfile.lock index 68666b4..b829332 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -306,6 +306,11 @@ GEM prettyprint prettyprint (0.2.0) prism (1.4.0) + propshaft (1.1.0) + actionpack (>= 7.0.0) + activesupport (>= 7.0.0) + rack + railties (>= 7.0.0) psych (5.2.3) date stringio @@ -458,14 +463,6 @@ GEM tilt (~> 2.0) yard (~> 0.9, >= 0.9.24) yard-solargraph (~> 0.1) - sprockets (4.2.2) - concurrent-ruby (~> 1.0) - logger - rack (>= 2.2.4, < 4) - sprockets-rails (3.5.2) - actionpack (>= 6.1) - activesupport (>= 6.1) - sprockets (>= 3.0.0) sqlite3 (2.6.0) mini_portile2 (~> 2.8.0) sqlite3 (2.6.0-arm64-darwin) @@ -550,6 +547,7 @@ DEPENDENCIES nostr (~> 0.6.0) pagy (~> 6.0, >= 6.0.2) pg (~> 1.5) + propshaft puma (~> 4.1) rails (~> 8.0) rails-controller-testing @@ -561,7 +559,6 @@ DEPENDENCIES sidekiq (< 7) sidekiq-scheduler solargraph - sprockets-rails sqlite3 (>= 2.1) stimulus-rails turbo-rails diff --git a/app/assets/config/manifest.js b/app/assets/config/manifest.js deleted file mode 100644 index 4d205bf..0000000 --- a/app/assets/config/manifest.js +++ /dev/null @@ -1,4 +0,0 @@ -//= link_tree ../images -//= link_tree ../../javascript .js -//= link_tree ../builds -//= link_tree ../../../vendor/javascript .js