Use ESM with importmap to manage modern JavaScript in Rails without transpiling or bundling.
Full Changelog: https://github.com/rails/importmap-rails/compare/v0.8.2...v0.9.0
--download
or -d
to bin/importmap
to download pinned packages from the CDN into vendor/javascript
. This removes a runtime dependency on the CDN. Note that you must add //= link_tree ../../../vendor/javascript .js
to your app/assets/config/manifest.js
file when using Sprockets (this is automatically done on new installations).preload: true
to have them be preloaded.Full Changelog: https://github.com/rails/importmap-rails/compare/v0.7.6...v0.8.0