Socket
Book a DemoInstallSign in
Socket

@jspm/plugin-rollup

Package Overview
Dependencies
Maintainers
3
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jspm/plugin-rollup

Rollup plugin for jspm 2

latest
Source
npmnpm
Version
1.2.4
Version published
Maintainers
3
Created
Source

@jspm/plugin-rollup

Standards-based JSPM Rollup plugin, including:

  • All module references as URLs
  • Support for resolving packages via node_modules or CDN providers
  • Fully compatible with Node.js resolution semantics
  • Support for import maps
  • Support for TypeScript

Installation

npm install @jspm/plugin-rollup rollup --save-dev

Usage

rollup.config.js

import jspmRollup from '@jspm/plugin-rollup';

const baseUrl = new URL('./components', import.meta.url);

export default {
  // Important to use "./" here to indicate a local path
  // and not a package. Resolved to baseUrl below.
  input: './main.js',
  plugins: [
    jspmRollup({
      baseUrl,

      // Generator options as per @jspm/generator
      defaultProvider: 'nodemodules',
      env: ['browser'],

      // map of externals to aliased or true
      externals: {
        react: 'custom-react'
      }
    })
  ]
}
rollup -c

FAQs

Package last updated on 19 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts