Skip to content

Commit

Permalink
adds importmap config
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorrf committed Jun 7, 2024
1 parent 6ac1f1c commit d513432
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
3 changes: 0 additions & 3 deletions gemfiles/rails_7_0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ gem 'puma', '>= 5.0'
# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
gem 'importmap-rails'

# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
gem 'webpacker', '~> 5.0'

# Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev]
gem 'turbo-rails'

Expand Down
2 changes: 1 addition & 1 deletion spec/rails-app-7_0/app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<%= csp_meta_tag %>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbo-track': 'reload' %>
<%= javascript_pack_tag 'application', 'data-turbo-track': 'reload' %>
<%= javascript_importmap_tags %>
</head>
<body>
<header>
Expand Down
1 change: 1 addition & 0 deletions spec/rails-app-7_0/config/importmap.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pin "application", preload: true

0 comments on commit d513432

Please sign in to comment.