# Importmap for Rails

> Use ESM with importmap to manage modern JavaScript in Rails without transpiling or bundling

Source: https://talira.ai/catalog/importmap-for-rails-nszvnc7v
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library, Command-line tool
- Categories: [frameworks / rails / javascript modules](https://talira.ai/categories/frameworks/rails/javascript-modules), [frameworks / rails / asset bundling](https://talira.ai/categories/frameworks/rails/asset-bundling), [languages / ruby / rails](https://talira.ai/categories/languages/ruby/rails)
- Licence: MIT[^1]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Self-hostable: yes[^2]
- Backed by: [Ruby on Rails](https://talira.ai/orgs/ruby-on-rails.md)
- Creator: David Heinemeier Hansson

Importmap for Rails lets a [Rails](https://talira.ai/catalog/ruby-on-rails-xkdcpj5k.md) app use modern JavaScript libraries written as ES modules straight from the browser, without Node, npm, a bundler or a transpiler. `config/importmap.rb` maps logical names to versioned, digested files; `bin/importmap pin` downloads packages from a JavaScript CDN into `vendor/javascript`, and the asset pipeline ([Propshaft](https://talira.ai/catalog/propshaft-qtpqd0hb.md)) serves them. Many small files cache better than one bundle over HTTP/2. It's included in new Rails apps since Rails 7, and adds preloading and automatic Subresource Integrity.

## Links

- GitHub: https://github.com/rails/importmap-rails

## Problems it solves

- use JavaScript packages in a Rails app without installing Node or running a bundler
- drop webpack and yarn from our Rails app's toolchain
- pin a JavaScript library version and vendor it into the repo
- a JavaScript change shouldn't bust the browser cache for every other script
- add integrity hashes to every JavaScript module we load
- preload the JavaScript modules a page needs

## Features

- config/importmap.rb pins
- bin/importmap pin, unpin, outdated and audit
- downloads packages into vendor/javascript
- preloading pinned modules
- automatic Subresource Integrity
- local modules in app/javascript

## Capabilities

- Has a command line tool: plan not known

## Trust

Overall: 0.40 out of 1.
Signals: backing 0.50, extensibility 0.20.

- backed by Ruby on Rails
- created by David Heinemeier Hansson

Warnings:

- GitHub activity not fetched yet

## Alternatives

- [Shakapacker](https://talira.ai/catalog/shakapacker-hhhnjmth.md): Use Webpack to manage app-like JavaScript modules in Rails

## Sources

[^1]: https://github.com/rails/importmap-rails/blob/main/MIT-LICENSE (checked 21 Nov 2026)
[^2]: https://github.com/rails/importmap-rails (checked 21 Nov 2026)
