# babel-plugin-transform-modules-amd **Repository Path**: mirrors_ecomfe/babel-plugin-transform-modules-amd ## Basic Information - **Project Name**: babel-plugin-transform-modules-amd - **Description**: es2015 module tranformer for amd - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-08 - **Last Updated**: 2026-02-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # babel-plugin-transform-modules-amd es2015 module tranformer for amd. ## Difference because of the difference between `es2015 module` and `amd module`, this plugin don't support `named export` and `default export` at the same time. - `import * as foo from 'foo'` and `import foo from 'foo'` are equal - `export foo; export default foo;` will throw: 'amd module don't support `export default foo` and , `export foo` both, please choose one ## Installation ``` sh $ npm install babel-plugin-transform-modules-amd --save-dev ``` ## Usage ### Via `.babelrc` (Recommended) **.babelrc** ```json { "plugins": ["transform-modules-amd"] } ``` ### Via CLI ```sh $ babel --plugins transform-modules-amd script.js ``` ### Via Node API ```javascript require("babel-core").transform("code", { plugins: ["transform-modules-amd"] }); ```