Open Jake839 opened 10 months ago
Did you solve this? I have the same issue after switching from esbuild to importmap
I solved it by removing the explicit inclusion of application.js
.
Before:
<head>
<%= javascript_importmap_tags %>
<%= javascript_include_tag "application" %>
</head>
After:
<head>
<%= javascript_importmap_tags %>
</head>
Hi, I'm getting the following error in my JS console: SyntaxError: Unexpected string literal "@hotwired/turbo-rails". import call expects one or two arguments.
Do you guys know how to fix the error? My Gemfile has: gem "turbo-rails"
And I have the following at the top of my application.js: // Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails import "@hotwired/turbo-rails" import "controllers"
// For chartkick.com import "chartkick" import "Chart.bundle"
//Globally disable Turbo for forms Turbo.setFormMode("off")
//= require jquery3 Added per ChatGPT 11/4/23