# rails/importmap-rails

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

Repository: https://github.com/rails/importmap-rails
Canonical: https://ross.abutalabs.com/products/importmap-rails
Language: Ruby
License: MIT
License Family: permissive
Last push: 2026-01-07T20:25:13+00:00

## Health v2 (maintenance only)
Score: 66/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 61, release rhythm 53, longevity 100
- inputs: {"age_days": 1862, "days_push": 238, "days_rel": 238, "gap_med": 39.5, "n_releases_24m": 7}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1168, forks 123 (observed 2026-08-28T04:03:50.830950+00:00)

## What it is
A Rails gem that manages modern JavaScript via browser-native import maps, letting you use ESM modules with logical names without transpiling or bundling. It eliminates the need for Webpack, Yarn, or npm by pinning JavaScript dependencies through the Rails asset pipeline.

## Use cases
- manage javascript dependencies in rails without node
- use es modules with importmap in rails
- replace webpacker with import maps
- pin npm packages in rails asset pipeline
- avoid javascript bundling and transpiling
- improve js caching with small files over http/2

## When to choose
- you're building a Rails 7+ app with modern browsers and want a simple JS setup
- you want to drop the entire Node.js toolchain from your Rails project
- you value better cache granularity with many small JS files

## When to avoid
- you need to support legacy browsers without native importmap support
- you rely on JSX/TypeScript or other syntax requiring transpilation
- you need complex bundling optimizations like tree-shaking or code splitting

## Facets
- artifact type: library
- maturity: stable
- function: build-tool, package-manager, developer-tools, frontend-framework
- domain: web-development, frontend, developer-tools
- platform: ruby, browser
- tags: importmap, esm, rails, no-bundling, javascript-assets, asset-pipeline, web-server

## Member repositories
- rails/importmap-rails (main) score 66

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:50.830950+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:28:48.815950+00:00, confidence not recorded.
  - readme: https://github.com/rails/importmap-rails (fetched 2026-08-28T04:03:50.830950+00:00, sha 508e61973a9a)
- Data as of 2026-08-30T08:39:29.467469+00:00.
