@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 {
input: './main.js',
plugins: [
jspmRollup({
baseUrl,
defaultProvider: 'nodemodules',
env: ['browser'],
externals: {
react: 'custom-react'
}
})
]
}
rollup -c