{ "_args": [ [ "babel-plugin-transform-es2015-modules-commonjs@^6.8.0", "/home/bernhard/freifunk-app/node_modules/babel-preset-fbjs" ] ], "_from": "babel-plugin-transform-es2015-modules-commonjs@>=6.8.0 <7.0.0", "_id": "babel-plugin-transform-es2015-modules-commonjs@6.26.2", "_inCache": true, "_installable": true, "_location": "/babel-plugin-transform-es2015-modules-commonjs", "_nodeVersion": "9.4.0", "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/babel-plugin-transform-es2015-modules-commonjs_6.26.2_1524761013398_0.8491911130152716" }, "_npmUser": { "email": "loganfsmyth@gmail.com", "name": "loganfsmyth" }, "_npmVersion": "5.6.0", "_phantomChildren": {}, "_requested": { "name": "babel-plugin-transform-es2015-modules-commonjs", "raw": "babel-plugin-transform-es2015-modules-commonjs@^6.8.0", "rawSpec": "^6.8.0", "scope": null, "spec": ">=6.8.0 <7.0.0", "type": "range" }, "_requiredBy": [ "/babel-preset-es2015-node", "/babel-preset-fbjs", "/babel-preset-react-native" ], "_resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz", "_shasum": "58a793863a9e7ca870bdc5a881117ffac27db6f3", "_shrinkwrap": null, "_spec": "babel-plugin-transform-es2015-modules-commonjs@^6.8.0", "_where": "/home/bernhard/freifunk-app/node_modules/babel-preset-fbjs", "dependencies": { "babel-plugin-transform-strict-mode": "^6.24.1", "babel-runtime": "^6.26.0", "babel-template": "^6.26.0", "babel-types": "^6.26.0" }, "description": "This plugin transforms ES2015 modules to CommonJS", "devDependencies": { "babel-helper-plugin-test-runner": "^6.24.1", "babel-plugin-syntax-object-rest-spread": "^6.13.0" }, "directories": {}, "dist": { "fileCount": 3, "integrity": "sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q==", "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa4gG1CRA9TVsSAnZWagAA5h8QAIFZNrkSToxujndP3gvf\nUS3GQ+efYJANxMVm3cCOavaycGDgV6UsA3aMTfJ+039gAnadYMjawyF6PxfM\nIwJr68Kr7uMikLffi8ry3SwdanoNAPofpa/ukNa67I3CK6uu6dASSXRvavj0\ntCNRqHklK3+eVqgTc4bOoM1XNtIXTIKTc8CzV/QTiqz7KX4cubxe2vCf+gbP\nagUwQvFP2WbUjEPY2M1G4EoVfM2unfubiH1mANpgnJMmadK1AKaLDvD6gV+O\n40+NlYGlSA9HmPIJtxVGrRVGdRHPQ1o99uEbVFzhy3EW4I47xQPP522fppN9\nEWMMhfGGiSKw+YS6FU1tIS2W1/QI3gAHFykUE9m9xw7b8EI0LPB1E+C/Yf2U\ndcVidoniz67hrit+uApKwlbf9dY1Azl77m4dxTMhCt/tdyPO6dhYKXjqqFIq\nFv9POEVCrefdwB/Q+WqU6RTrpK1qZsIFpiP/sG+R0sz7ssPVjP4s10yyYx7Z\nFKdnj/hfHR9cddpm+GTziqRZFNjX5QwMvleEBfUU9vZt/gIeUpwNRnC1lf/W\nGv9EZj2Gh6zyJM0aoG4LmiTix7M9HfHxgRXdhhmV0piSsKyYnkoZ/ZECFa5/\nxd2X7q7VQ5bFaCJhfTsX1sDXkqjUcRGf43V/6T5gCHNBGf6SGU2fz2ua4NEa\ncUG+\r\n=MDo3\r\n-----END PGP SIGNATURE-----\r\n", "shasum": "58a793863a9e7ca870bdc5a881117ffac27db6f3", "tarball": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz", "unpackedSize": 28366 }, "keywords": [ "babel-plugin" ], "license": "MIT", "main": "lib/index.js", "maintainers": [ { "name": "danez", "email": "daniel@tschinder.de" }, { "name": "existentialism", "email": "bng412@gmail.com" }, { "name": "hzoo", "email": "hi@henryzoo.com" }, { "name": "loganfsmyth", "email": "loganfsmyth@gmail.com" }, { "name": "sebmck", "email": "sebmck@gmail.com" }, { "name": "thejameskyle", "email": "me@thejameskyle.com" } ], "name": "babel-plugin-transform-es2015-modules-commonjs", "optionalDependencies": {}, "readme": "# babel-plugin-transform-es2015-modules-commonjs\n\n> This plugin transforms ES2015 modules to [CommonJS](http://wiki.commonjs.org/wiki/Modules/1.1).\n>\n> #### Babel 6 Changes\n> \n> Babel 6 changed some behavior by not doing `module.exports = exports['default']` anymore in the modules transforms.\n> \n> There are some caveats, but you can use [babel-plugin-add-module-exports](https://www.npmjs.com/package/babel-plugin-add-module-exports), so that updating to Babel 6 isn't a breaking change since users that don't use ES modules don't have to do `require(\"your-module\").default`.\n> \n> However, it may not match how Node eventually implements ES modules natively given the [the current proposal](https://github.com/nodejs/node-eps/blob/master/002-es-modules.md#46-es-consuming-commonjs).\n\n## Example\n\n**In**\n\n```javascript\nexport default 42;\n```\n\n**Out**\n\n```javascript\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = 42;\n```\n\n## Installation\n\n```sh\nnpm install --save-dev babel-plugin-transform-es2015-modules-commonjs\n```\n\n## Usage\n\n### Via `.babelrc` (Recommended)\n\n**.babelrc**\n\n```js\n// without options\n{\n \"plugins\": [\"transform-es2015-modules-commonjs\"]\n}\n\n// with options\n{\n \"plugins\": [\n [\"transform-es2015-modules-commonjs\", {\n \"allowTopLevelThis\": true\n }]\n ]\n}\n```\n\n### Via CLI\n\n```sh\nbabel --plugins transform-es2015-modules-commonjs script.js\n```\n\n### Via Node API\n\n```javascript\nrequire(\"babel-core\").transform(\"code\", {\n plugins: [\"transform-es2015-modules-commonjs\"]\n});\n```\n\n## Options\n\n### `loose`\n\n`boolean`, defaults to `false`.\n\nAs per the spec, `import` and `export` are only allowed to be used at the top\nlevel. When in loose mode these are allowed to be used anywhere.\n\nAnd by default, when using exports with babel a non-enumerable `__esModule` property\nis exported.\n\n```javascript\nvar foo = exports.foo = 5;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n```\n\nIn environments that don't support this you can enable loose mode on `babel-plugin-transform-es2015-modules-commonjs`\nand instead of using `Object.defineProperty` an assignment will be used instead.\n\n```javascript\nvar foo = exports.foo = 5;\nexports.__esModule = true;\n```\n\n### `strict`\n\n`boolean`, defaults to `false`\n\nBy default, when using exports with babel a non-enumerable `__esModule` property\nis exported. In some cases this property is used to determine if the import _is_ the\ndefault export or if it _contains_ the default export.\n\n```javascript\nvar foo = exports.foo = 5;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n```\n\nIn order to prevent the `__esModule` property from being exported, you can set\nthe `strict` option to `true`.\n\n### `noInterop`\n\n`boolean`, defaults to `false`\n\nBy default, when using exports with babel a non-enumerable `__esModule` property\nis exported. This property is then used to determine if the import _is_ the default\nexport or if it _contains_ the default export.\n\n```javascript\n\"use strict\";\n\nvar _foo = require(\"foo\");\n\nvar _foo2 = _interopRequireDefault(_foo);\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\n```\n\nIn cases where the auto-unwrapping of `default` is not needed, you can set the\n`noInterop` option to `true` to avoid the usage of the `interopRequireDefault`\nhelper (shown in inline form above).\n", "readmeFilename": "README.md", "repository": { "type": "git", "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-es2015-modules-commonjs" }, "version": "6.26.2" }