Registry / devops / rollup-plugin-jspm

rollup-plugin-jspm

JSON →
library1.1.0jsnpmunverified

A Rollup plugin that integrates jspm 2 module resolution into the Rollup build pipeline. Version 1.1.0 is the latest stable release, with irregular release cadence. It resolves imports using jspm's import map and handles environment-specific module conditionals (browser/node). Unlike generic Rollup plugins, it leverages jspm's package management and dependency resolution, allowing projects to use jspm's import map as the single source of truth for module loading. Works well with Babel for transpilation. Note that it only supports jspm 2, not earlier versions.

npm install rollup-plugin-jspm
INSTALL
IMPORT
SIG · ROLLUP-PLUGIN-JSPM
R
rollup-plugin-jspm
devopsjavascriptv1.1.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import jspmRollup from 'rollup-plugin-jspm'
const jspm = require('rollup-plugin-jspm')
Default export is the plugin factory; CommonJS require may not work in ESM context.

Configures Rollup to use jspm for module resolution with browser environment and Babel transpilation.

// rollup.config.js import path from 'path'; import babelRollup from 'rollup-plugin-babel'; import jspmRollup from 'rollup-plugin-jspm'; const basePath = path.resolve('components'); export default { input: './main.js', plugins: [ jspmRollup({ basePath, env: { browser: true, node: false }, envTarget: { browsers: 'last 2 versions' }, externals: {} }), babelRollup() ] };
Debug
Known issues
gotchaThe plugin only supports jspm 2 and will not work with jspm 0.x or 1.x.
fix
Ensure your project uses jspm 2 (npm package jspm).
affects: >=1.0
gotchaThe `basePath` option must be an absolute path; relative paths may cause unexpected behavior.
fix
Use path.resolve() to provide absolute path.
affects: >=1.0
Errors
Common errors & fixes
Error: Could not resolve 'dependency' from 'file.js'
The dependency is not in jspm's import map or not installed.
fix
Run 'jspm install dependency' and ensure import map is up to date.
Error: Cannot find module 'rollup-plugin-jspm'
The plugin is not installed.
fix
Run 'npm install --save-dev rollup-plugin-jspm'.
Upgrade
Version history
1.1.0latest on npm
Audit
Dependencies
rolluprequiredpeer dependency - plugin is designed for Rollup
Agent activity
7 hits · last 30 days
node
6
OpenAI (training)
1
Resources
rollup-plugin-jspm — npm install rollup-plugin-jspm · libregistry