Skip to content

refactor: Move Sprocket JS files to Webpack (Part 1) #3025

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
4 changes: 0 additions & 4 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
//= require rails-timeago
//= require locales/jquery.timeago.de.js
//
// lib/assets
//= require flash
//= require color_mode_picker
//
// app/assets
// --> Include some assets first, as they are used by other assets.
// --> Hence, the order specified here is important.
Expand Down
4 changes: 4 additions & 0 deletions app/javascript/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,7 @@ window.ace = ace; // Publish ace in global namespace
// Turbo
import '@hotwired/turbo-rails';
import './turbo-migration';

// Import of Rails sprocket assets with minimal changes. After the initial migration these files should
// be moved to an appropriate place after some adjustments to fit modern Rails JS.
import 'sprocket_asset_import';

Choose a reason for hiding this comment

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

Do you have a naming convention for JS files? I see snake case and kebab case mixed.

4 changes: 4 additions & 0 deletions app/javascript/sprocket_asset_import/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import './flash';
import './color_mode_picker';

import './request_for_comments';