Skip to content

Commit ad943d2

Browse files
committed
refactor: Move Sprocket JS files to Webpack (Part 1)
JavaScript for RfCs, Flashes and the color mode can be moved without modifications. Relates to #3021
1 parent 955f7d6 commit ad943d2

File tree

6 files changed

+8
-4
lines changed

6 files changed

+8
-4
lines changed

app/assets/javascripts/application.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@
1313
//= require rails-timeago
1414
//= require locales/jquery.timeago.de.js
1515
//
16-
// lib/assets
17-
//= require flash
18-
//= require color_mode_picker
19-
//
2016
// app/assets
2117
// --> Include some assets first, as they are used by other assets.
2218
// --> Hence, the order specified here is important.

app/javascript/application.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,7 @@ window.ace = ace; // Publish ace in global namespace
8888
// Turbo
8989
import '@hotwired/turbo-rails';
9090
import './turbo-migration';
91+
92+
// Import of Rails sprocket assets with minimal changes. After the initial migration these files should
93+
// be moved to an appropriate place after some adjustments to fit modern Rails JS.
94+
import 'sprocket_asset_import'
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import './flash'
2+
import './color_mode_picker'
3+
4+
import './request_for_comments'

0 commit comments

Comments
 (0)