I have Rails 7.0.4
.
I generated the project using this command.
rails new myproject --database=postgresql -j esbuild --css bootstrap
Thus, I don't have a file named config/importmap.rb
.
How do I load a single file with custom JS?
I tried creating a file with a single console.log
here.
// ./app/javascript/new.js
console.log('Hi')
and then load this file into the entry point application.js
like this.
// ./app/javascript/application.js
import "./new.js"
But I don't see any console.log
.
Thanks in advance~!