playing around with Rails 7 and import maps. Trying to import a folder with some custom JS.
# config/importmap.rb
pin_all_from "app/javascript/custom", under: "custom"
# app/javascript/application.js
import "custom"
Gives Uncaught TypeError: Failed to resolve module specifier "custom" on Chrome
and Uncaught Error: Unable to resolve specifier 'custom' from [shim] on Firefox
interestingly import "custom/script" works fine.
what am I doing wrong?
import "custom/script"also throws an error for me (Firefox).