Re:Web apps built with Ruby on Rails
by douchescript on Friday January 10, 2025 @01:41PM
(#42658596)
But how do you integrate and turn on at a specific page/controller view? Look for a specific dom id?
Re:Web apps built with Ruby on Rails
by douchescript on Monday January 13, 2025 @06:30AM
(#42682357)
It would be a valid thing if there was a documented way to convert a generic node package to import map. Not much stuff in that importmap ecosystem - seems doa.
https://guides.rubyonrails.org/working_with_javascript_in_ra...
- Adding npm Packages with importmap-rails To add new packages to your import map-powered application, run the bin/importmap pin command from your terminal:
$ bin/importmap pin react react-dom
Then, import the package into application.js as usual:
import ReactDOM from "react-dom"