Uncaught TypeError: Failed to resolve module specifier "application". Relative references must start with either "/", "./", or "../".
In rails 7 while creating an engine. It is unable to load the javascript. Also tried to load the assets in assets.rb
:
Rails.application.config.assets.precompile += %w( application.js )
In engine.rb
loaded importmap:
app.config.importmap.paths << root.join("config/importmap.rb")
application.js
from the main app or is that file in your engine?