A Babel plugin (v2.32.2, last released 2024-03-05) that wraps CommonJS modules inside AMD define() calls. It automatically detects require() calls and adds them as AMD dependencies, removing the need for manual dependency arrays. Part of the Liferay Frontend Projects monorepo, maintained for liferay-portal build system. Infrequently updated; stable but low community adoption outside Liferay. Requires Babel 6/7 and the plugin must be listed in .babelrc. No active development seen in recent years.
npm install babel-plugin-wrap-modules-amdVerified import paths — ran on the pinned version, not inferred.
Shows how to configure the plugin in .babelrc and its effect: a CommonJS module with require() gets wrapped in an AMD define() call with dependencies auto-detected.
Use Babel plugin-transform-modules-commonjs first if using ES import syntax.
If you need named modules, use a different plugin like babel-plugin-amd-define.
Use a modern bundler that outputs AMD if needed, or adopt a different output format.
Run: npm install --save-dev babel-plugin-wrap-modules-amd and ensure node_modules path is correct.
Include an AMD loader such as RequireJS, or use the plugin to output CommonJS instead.
No dependency data recorded yet.