{"library":"rollup-plugin-amd","title":"rollup-plugin-amd","description":"Rollup plugin that converts AMD modules (e.g., RequireJS) to ES2016 modules for bundling. Version 4.0.0 requires Node >=8 and Rollup 1.x+. It wraps the amd-to-es6 converter and provides include/exclude filtering and a rewire function to map AMD dependency IDs to file paths. Compared to manual conversion, it automates the transform within the Rollup build pipeline. Release cadence is low; last major update was in 2019.","language":"javascript","status":"maintenance","last_verified":"Mon Apr 27","install":{"commands":["npm install rollup-plugin-amd"],"cli":null},"imports":["import amd from 'rollup-plugin-amd'","import amd from 'rollup-plugin-amd'","amd({ include: 'src/**', exclude: ['node_modules/**'] })"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { rollup } from 'rollup';\nimport amd from 'rollup-plugin-amd';\n\nasync function build() {\n  const bundle = await rollup({\n    input: 'main.js',\n    plugins: [\n      amd({\n        include: 'src/**',\n        exclude: ['node_modules/**'],\n        rewire: (moduleId, parentPath) => {\n          // Map AMD module IDs to file paths\n          return './javascripts/' + moduleId;\n        }\n      })\n    ]\n  });\n  await bundle.write({ file: 'bundle.js', format: 'iife' });\n}\n\nbuild().catch(console.error);","lang":"javascript","description":"Shows basic usage: import the plugin, create a Rollup config, apply the plugin with include/exclude and a custom rewire function.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}