{"meta":{"name":"FindSoftware","page":"https://findsoftware.frbit.cloud/importmap-rails/","markdown":"https://findsoftware.frbit.cloud/importmap-rails.md","license":"https://creativecommons.org/licenses/by/4.0/","attribution":"FindSoftware, CC BY 4.0","note":"Attributes are recorded, never scored. An absent field means unknown, never zero and never bad."},"record":{"id":"importmap-rails","name":"importmap-rails","urls":{"repository":"https://github.com/rails/importmap-rails","docs":"https://github.com/rails/importmap-rails/blob/v2.2.3/README.md"},"category":["build-tool"],"description":"Ruby gem that adds import maps to Rails so JavaScript ES modules load in the browser without transpiling or bundling.","maintainer":"Basecamp","firstRelease":2021,"hosting":null,"language":"ruby","runtime":["ruby"],"runtimeMin":"ruby 3.1","basedOn":["rails"],"contentStore":null,"databases":null,"adminUi":null,"headlessApi":null,"templating":null,"i18n":null,"renderingModes":null,"installMethod":"bundler, then rails generator importmap:install","licenseModel":"open-source","license":"MIT","currentMajor":"2","latestReleaseDate":"2026-01-07T00:00:00.000Z","githubStargazers":1165,"contributors":62,"packagistDownloads":null,"npmWeeklyDownloads":null,"dependentRepos":15822,"dependentPackages":44,"checkedAt":"2026-10-28T00:00:00.000Z","addedAt":"2026-10-28T00:00:00.000Z","sources":[{"field":"urls","url":"https://api.github.com/repos/rails/importmap-rails","checkedAt":"2026-10-28T00:00:00.000Z"},{"field":"urls","url":"https://github.com/rails/importmap-rails/blob/v2.2.3/README.md","checkedAt":"2026-10-28T00:00:00.000Z"},{"field":"maintainer","url":"https://github.com/rails/importmap-rails/blob/v2.2.3/MIT-LICENSE","checkedAt":"2026-10-28T00:00:00.000Z"},{"field":"language","url":"https://api.github.com/repos/rails/importmap-rails","checkedAt":"2026-10-28T00:00:00.000Z"},{"field":"basedOn","url":"https://github.com/rails/importmap-rails/blob/v2.2.3/README.md","checkedAt":"2026-10-28T00:00:00.000Z"},{"field":"category","url":"https://api.github.com/repos/rails/importmap-rails","checkedAt":"2026-10-28T00:00:00.000Z"},{"field":"runtime","url":"https://github.com/rails/importmap-rails/blob/v2.2.3/importmap-rails.gemspec","checkedAt":"2026-10-28T00:00:00.000Z"},{"field":"runtimeMin","url":"https://github.com/rails/importmap-rails/blob/v2.2.3/importmap-rails.gemspec","checkedAt":"2026-10-28T00:00:00.000Z"},{"field":"installMethod","url":"https://github.com/rails/importmap-rails/blob/v2.2.3/README.md","checkedAt":"2026-10-28T00:00:00.000Z"},{"field":"license","url":"https://github.com/rails/importmap-rails/blob/v2.2.3/importmap-rails.gemspec","checkedAt":"2026-10-28T00:00:00.000Z"},{"field":"licenseModel","url":"https://github.com/rails/importmap-rails/blob/v2.2.3/MIT-LICENSE","checkedAt":"2026-10-28T00:00:00.000Z"},{"field":"firstRelease","url":"https://rubygems.org/api/v1/versions/importmap-rails.json","checkedAt":"2026-10-28T00:00:00.000Z"},{"field":"currentMajor","url":"https://rubygems.org/api/v1/gems/importmap-rails.json","checkedAt":"2026-10-28T00:00:00.000Z"},{"field":"latestReleaseDate","url":"https://rubygems.org/api/v1/gems/importmap-rails.json","checkedAt":"2026-10-28T00:00:00.000Z"},{"field":"githubStargazers","url":"https://api.github.com/repos/rails/importmap-rails","checkedAt":"2026-10-28T00:00:00.000Z"},{"field":"contributors","url":"https://api.github.com/repos/rails/importmap-rails/contributors","checkedAt":"2026-10-28T00:00:00.000Z"},{"field":"dependentPackages","url":"https://packages.ecosyste.ms/api/v1/registries/rubygems.org/packages/importmap-rails","checkedAt":"2026-10-28T00:00:00.000Z"},{"field":"dependentRepos","url":"https://packages.ecosyste.ms/api/v1/registries/rubygems.org/packages/importmap-rails","checkedAt":"2026-10-28T00:00:00.000Z"}],"status":"active","ai":"authored"},"prose":"importmap-rails is a Ruby gem that adds import maps to Rails, so the browser loads JavaScript ES modules directly. The application's `config/importmap.rb` pins logical module names to local files or CDN URLs, and the layout helper `javascript_importmap_tags` writes the map into the page. The `./bin/importmap` command downloads npm packages from a CDN into `vendor/javascript`, where they are served by the asset pipeline.\n\nThe README presents this as an approach that avoids transpiling and bundling, so an application ships many small files instead of one bundle. Rails 7 and later include the gem by default in new applications.\n\n## Worth knowing\n\nSubresource integrity is opt-in: the gem adds hashes only after `enable_integrity!` is called in the importmap configuration, and Propshaft needs an integrity algorithm set in the application."}