{"bugs":{"url":"https://github.com/rollup/rollup-plugin-babel/issues"},"dist":{"shasum":"69ad2d2859d34d058379e2168d6dd93b40487934","tarball":"https://registry.npmjs.org/rollup-plugin-babel/-/rollup-plugin-babel-4.1.0-0.tgz","fileCount":13,"integrity":"sha512-whxVQDhbA+gggqnz2+CWqYj8kA5SlObR0+AR2V9AxHu7qb+MfugiBn3LYjXNJec2v2K2RwzeRF+w+Uf+z+YX6Q==","signatures":[{"sig":"MEUCIQDbWkcCQjB4MXmWpmJth5yLN9P6a43FMv3lWVc31fENewIgAPSBcdF0n7mMaiUyyd2SLIn62qZulkqaUWEQTpBQ+UE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":56332,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJboBZDCRA9TVsSAnZWagAAUYgQAIJsilpdJwN6YUl/z4gj\nCqt5vAalq7e4CCqUNLzXSBjkPG513wHCxdZsMsHADIv7sltxIcklj/t7C+q8\nCf6ifeh3fEGuzUzQvLhMRz9K+qy6GMUW5PjOwOITM38erAKaymqR8PZWoqqN\nDXqE7O/EmT/XrLcUfrSalKL+xESLZmUhByxCm4URE8O8cFuccdhd3aLsjTOM\nqamr/Kdy+WcBDi14/hhF0oWF608lUqsUtllfMowFrgx2EbvStIUWlJgsv/B/\n3MaKU8PGnSXWuDUuwCsYOm2pDJO0NbBeysdefxcjIQ9yRJUx69/GGKb9+Hyi\nAaE/lCezuxkD+xNJ0FTB6YblCV0g7qSXlLwXmO7XQJU/ahAQoc2pSI/a5gKa\ntfSxUJGr7VIlw73r4/fB4NdvHl4NSVJKstnnziXg7pbFm5vVIxUZNjUHAzeI\nOGsOtFFG+urlaE5u191pJj6FmaUMg/sL92De+bxdjd8Z23bU0XnhoztCA7Nm\n2IMTo49ekkqLx74jlFJTeUDL4eqcStgZ1KZzUuwFagyo1PmBPES0Is6CHQT+\nEd3/hgrUljbscW0XJIUafC8bdwOMxUPKyxWBY4gfcw0OCzZJsewa6haOpqTD\nVVSvu0u+xlUT7p29I233QCOzJmmBoyw4id7SomIaaCxaTq9KHTEsiWx4yqGD\n3dm7\r\n=X1zt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/rollup-plugin-babel.cjs.js","name":"rollup-plugin-babel","author":{"name":"Rich Harris"},"module":"dist/rollup-plugin-babel.esm.js","readme":"# rollup-plugin-babel\n\nSeamless integration between Rollup and Babel.\n\n## Why?\n\nIf you're using Babel to transpile your ES6/7 code and Rollup to generate a standalone bundle, you have a couple of options:\n\n- run the code through Babel first, being careful to exclude the module transformer, or\n- run the code through Rollup first, and _then_ pass it to Babel.\n\nBoth approaches have disadvantages – in the first case, on top of the additional configuration complexity, you may end up with Babel's helpers (like `classCallCheck`) repeated throughout your code (once for each module where the helpers are used). In the second case, transpiling is likely to be slower, because transpiling a large bundle is much more work for Babel than transpiling a set of small files.\n\nEither way, you have to worry about a place to put the intermediate files, and getting sourcemaps to behave becomes a royal pain.\n\nUsing Rollup with rollup-plugin-babel makes the process far easier.\n\n## Installation\n\n> babel 7.x\n\n```bash\nnpm install --save-dev rollup-plugin-babel@latest\n```\n\n> babel 6.x\n\n```bash\nnpm install --save-dev rollup-plugin-babel@3\n```\n\n## Usage\n\n```js\nimport { rollup } from 'rollup';\nimport babel from 'rollup-plugin-babel';\n\nrollup({\n  entry: 'main.js',\n  plugins: [\n    babel({\n      exclude: 'node_modules/**'\n    })\n  ]\n}).then(...)\n```\n\nAll options are as per the [Babel documentation](https://babeljs.io/), except the following:\n\n- `options.externalHelpers`: a boolean value indicating whether to bundle in the Babel helpers\n- `options.include` and `options.exclude`: each a minimatch pattern, or array of minimatch patterns, which determine which files are transpiled by Babel (by default, all files are transpiled)\n- `options.externalHelpersWhitelist`: an array which gives explicit control over which babelHelper functions are allowed in the bundle (by default, every helper is allowed)\n\nBabel will respect `.babelrc` files – this is generally the best place to put your configuration.\n\n### External dependencies\n\nIdeally, you should only be transforming your source code, rather than running all of your external dependencies through Babel – hence the `exclude: 'node_modules/**'` in the example above. If you have a dependency that exposes untranspiled ES6 source code that doesn't run in your target environment, then you may need to break this rule, but it often causes problems with unusual `.babelrc` files or mismatched versions of Babel.\n\nWe encourage library authors not to distribute code that uses untranspiled ES6 features (other than modules) for this reason. Consumers of your library should _not_ have to transpile your ES6 code, any more than they should have to transpile your CoffeeScript, ClojureScript or TypeScript.\n\nUse `babelrc: false` to prevent Babel from using local (i.e. to your external dependencies) `.babelrc` files, relying instead on the configuration you pass in.\n\n### Helpers\n\nIn some cases Babel uses _helpers_ to avoid repeating chunks of code – for example, if you use the `class` keyword, it will use a `classCallCheck` function to ensure that the class is instantiated correctly.\n\nBy default, those helpers will be inserted at the top of the file being transformed, which can lead to duplication. This rollup plugin automatically deduplicates those helpers, keeping only one copy of each one used in the output bundle. Rollup will combine the helpers in a single block at the top of your bundle. To achieve the same in Babel 6 you must use the `external-helpers` plugin.\n\nAlternatively, if you know what you're doing, you can use the `transform-runtime` plugin. If you do this, use `runtimeHelpers: true`:\n\n```js\nrollup.rollup({\n  ...,\n  plugins: [\n    babel({ runtimeHelpers: true })\n  ]\n}).then(...)\n```\n\nBy default `externalHelpers` option is set to `false` so babel helpers will be included in your bundle.\n\nIf you do not wish the babel helpers to be included in your bundle at all (but instead reference the global `babelHelpers` object), you may set the `externalHelpers` option to `true`:\n\n```js\nrollup.rollup({\n  ...,\n  plugins: [\n    babel({\n      plugins: ['external-helpers'],\n      externalHelpers: true\n    })\n  ]\n}).then(...)\n```\n\n### Modules\n\n_This is not needed for Babel 7 - it knows automatically that Rollup understands ES modules & that it shouldn't use any module transform with it. The section below describes what needs to be done for Babel 6._\n\nThe `env` preset includes the [transform-es2015-modules-commonjs](http://babeljs.io/docs/plugins/transform-es2015-modules-commonjs/) plugin, which converts ES6 modules to CommonJS – preventing Rollup from working. Since Babel 6.3 it's possible to deactivate module transformation with `\"modules\": false`. So there is no need to use the old workaround with `babel-preset-es2015-rollup`, that will work for Babel <6.13. Rollup will throw an error if this is incorrectly configured.\n\nHowever, setting `modules: false` in your `.babelrc` may conflict if you are using `babel-register`. To work around this, specify `babelrc: false` in your rollup config. This allows Rollup to bypass your `.babelrc` file. In order to use the `env` preset, you will also need to specify it with `modules: false` option:\n\n```js\nplugins: [\n\tbabel({\n\t\tbabelrc: false,\n\t\tpresets: [['env', { modules: false }]],\n\t}),\n];\n```\n\n## Configuring Babel 6\n\n**The following applies to Babel 6 only. If you're using Babel 5, do `npm i -D rollup-plugin-babel@1`, as version 2 and above no longer supports Babel 5**\n\n```bash\nnpm install --save-dev rollup-plugin-babel@3 babel-preset-env babel-plugin-external-helpers\n```\n\n```js\n// .babelrc\n{\n  \"presets\": [\n    [\n      \"env\",\n      {\n        \"modules\": false\n      }\n    ]\n  ],\n  \"plugins\": [\n    \"external-helpers\"\n  ]\n}\n```\n\n## License\n\nMIT\n","gitHead":"b709cad15993398a070a13ebd2b2895af63629d4","license":"MIT","scripts":{"lint":"eslint src","test":"mocha","build":"rollup -c","prepare":"npm run build","pretest":"npm run build","prebuild":"rm -rf dist/*","precommit":"lint-staged","prepublish":"npm run lint && npm test"},"_npmUser":{"name":"andarist","email":"mateuszburzynski@gmail.com"},"homepage":"https://github.com/rollup/rollup-plugin-babel","keywords":["rollup-plugin","babel","es2015","es6"],"repository":{"url":"git+https://github.com/rollup/rollup-plugin-babel.git","type":"git"},"_npmVersion":"6.1.0","description":"Seamless integration between Rollup and Babel.","directories":{},"maintainers":[{"name":"andarist","email":"mateuszburzynski@gmail.com"},{"name":"danez","email":"daniel@tschinder.de"},{"name":"eventualbuddha","email":"me@brian-donovan.com"},{"name":"existentialism","email":"bng412@gmail.com"},{"name":"hzoo","email":"hi@henryzoo.com"},{"name":"loganfsmyth","email":"loganfsmyth@gmail.com"},{"name":"rich_harris","email":"richard.a.harris@gmail.com"},{"name":"trysound","email":"trysound@yandex.ru"},{"name":"victorystick","email":"victorystick@gmail.com"}],"_nodeVersion":"10.5.0","contributors":[{"name":"Bogdan Chadkin","email":"trysound@yandex.ru"}],"dependencies":{"rollup-pluginutils":"^2.3.0","@babel/helper-module-imports":"^7.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"buble":"^0.19.3","husky":"^0.14.3","mocha":"^5.2.0","eslint":"^5.0.1","rollup":"^0.64.1","prettier":"^1.14.2","source-map":"^0.6.1","@babel/core":"^7.0.0","lint-staged":"^7.2.2","@babel/preset-env":"^7.0.0","rollup-plugin-json":"^3.0.0","source-map-support":"^0.5.6","rollup-plugin-buble":"^0.19.2","@babel/plugin-external-helpers":"^7.0.0","@babel/plugin-transform-runtime":"^7.0.0","@babel/plugin-proposal-decorators":"^7.0.0"},"peerDependencies":{"rollup":">=0.60.0 <1","@babel/core":"7 || ^7.0.0-rc.2"},"_npmOperationalInternal":{"tmp":"tmp/rollup-plugin-babel_4.1.0-0_1537218114850_0.6108289182652891","host":"s3://npm-registry-packages"},"_id":"rollup-plugin-babel@4.1.0-0","version":"4.1.0-0"}