{"_id":"babel-plugin-remove-webpack","_rev":"6-073adfdcce87544abe3696431ed6e120","name":"babel-plugin-remove-webpack","description":"Removes webpack-specific functions from JavaScript code.","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"babel-plugin-remove-webpack","version":"1.0.0","description":"Removes webpack-specific functions from JavaScript code.","main":"lib/index.js","scripts":{"build":"babel src --out-dir lib","pretest":"eslint src test","test":"babel-node ./test/index.test.js | faucet","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/knpwrs/babel-plugin-remove-webpack.git"},"keywords":["babel-plugin","remove","webpack"],"author":{"name":"Kenneth Powers","email":"ken@kenpowers.net","url":"http://knpw.rs"},"license":"MIT","devDependencies":{"babel-cli":"^6.3.17","babel-core":"^6.3.26","babel-eslint":"^4.1.6","babel-plugin-add-module-exports":"^0.1.2","babel-preset-es2015":"^6.3.13","babel-register":"^6.3.13","eslint":"^1.10.3","eslint-config-airbnb":"^3.0.0","faucet":"0.0.1","tape":"^4.4.0"},"gitHead":"ad6447855a40e535560030beb37819f4ac965334","bugs":{"url":"https://github.com/knpwrs/babel-plugin-remove-webpack/issues"},"homepage":"https://github.com/knpwrs/babel-plugin-remove-webpack#readme","_id":"babel-plugin-remove-webpack@1.0.0","_shasum":"9786c7787a562e43b69a5d70ae379cd8e7b412a7","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.3.0","_npmUser":{"name":"kenpowers","email":"ken@kenpowers.net"},"dist":{"shasum":"9786c7787a562e43b69a5d70ae379cd8e7b412a7","tarball":"https://registry.npmjs.org/babel-plugin-remove-webpack/-/babel-plugin-remove-webpack-1.0.0.tgz","integrity":"sha512-M1hH8vYOLaOQuRmrHLr2ZAwDQqDbD1U4Da9ORG1YxOoZi6MvUyPBz/D4AIHKxTRlkqvfIxFy/BN0SikH8fjPNQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICt2x4yr9cQ6DOnpZosZSlkUKTdY95OzomR9n9rX+pDBAiEAjFFJMqI5MfFSZsqW6AJhDf5YYnoytcsEzJ+GMAV0cJI="}]},"maintainers":[{"name":"kenpowers","email":"ken@kenpowers.net"}],"directories":{}},"1.1.0":{"name":"babel-plugin-remove-webpack","version":"1.1.0","description":"Removes webpack-specific functions from JavaScript code.","main":"lib/index.js","scripts":{"build":"babel src --out-dir lib","pretest":"eslint src test","test":"babel-node ./test/index.test.js | faucet","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/knpwrs/babel-plugin-remove-webpack.git"},"keywords":["babel-plugin","remove","webpack"],"author":{"name":"Kenneth Powers","email":"ken@kenpowers.net","url":"http://knpw.rs"},"license":"MIT","devDependencies":{"babel-cli":"^6.3.17","babel-core":"^6.3.26","babel-eslint":"^4.1.6","babel-plugin-add-module-exports":"^0.1.2","babel-preset-es2015":"^6.3.13","babel-register":"^6.3.13","eslint":"^1.10.3","eslint-config-airbnb":"^3.0.0","faucet":"0.0.1","tape":"^4.4.0"},"gitHead":"3ecbcb1c40ed06a9b18e0c9c13d980bd96867d94","bugs":{"url":"https://github.com/knpwrs/babel-plugin-remove-webpack/issues"},"homepage":"https://github.com/knpwrs/babel-plugin-remove-webpack#readme","_id":"babel-plugin-remove-webpack@1.1.0","_shasum":"82925cab871230c0c6b82cf67a3af243c094d1d6","_from":".","_npmVersion":"3.7.2","_nodeVersion":"5.6.0","_npmUser":{"name":"kenpowers","email":"ken@kenpowers.net"},"dist":{"shasum":"82925cab871230c0c6b82cf67a3af243c094d1d6","tarball":"https://registry.npmjs.org/babel-plugin-remove-webpack/-/babel-plugin-remove-webpack-1.1.0.tgz","integrity":"sha512-KAkJOPcV4BMQslXHlr5O82QLuyvizJ0Ceq+1UnEM226tcH7YgBXaNyKSdMNBZ53BydZfvsS/7XlIjRWrmvW1Yw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDv4+CG5nV1krLY1zXcyK5WdPatlwGVj3PsrNV6y+tUsgIgc8WFRLnwnwmEiplVuJ3X6+/784VTNhXXavrpgPZPnVA="}]},"maintainers":[{"name":"kenpowers","email":"ken@kenpowers.net"}],"_npmOperationalInternal":{"host":"packages-6-west.internal.npmjs.com","tmp":"tmp/babel-plugin-remove-webpack-1.1.0.tgz_1456177398420_0.9302778781857342"},"directories":{}}},"readme":"# babel-plugin-remove-webpack\n\n[![Dependency Status](https://img.shields.io/david/knpwrs/babel-plugin-remove-webpack.svg)](https://david-dm.org/knpwrs/babel-plugin-remove-webpack)\n[![devDependency Status](https://img.shields.io/david/dev/knpwrs/babel-plugin-remove-webpack.svg)](https://david-dm.org/knpwrs/babel-plugin-remove-webpack#info=devDependencies)\n[![Build Status](https://img.shields.io/travis/knpwrs/babel-plugin-remove-webpack.svg)](https://travis-ci.org/knpwrs/babel-plugin-remove-webpack)\n[![Npm Version](https://img.shields.io/npm/v/babel-plugin-remove-webpack.svg)](https://www.npmjs.com/package/babel-plugin-remove-webpack)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![Badges](https://img.shields.io/badge/badges-6-orange.svg)](http://shields.io/)\n\nRemoves [webpack]-specific functions from JavaScript code.\n\n## [`require.ensure`]\n\n`require.ensure` is replaced with an [IIFE].\n\n```js\n// Before\nrequire.ensure(['a', 'b', 'c'], function (require) {\n  const a = require('a');\n  const b = require('b');\n  const c = require('c');\n});\n\n// After\n(function () {\n  const a = require('a');\n  const b = require('b');\n  const c = require('c');\n})();\n```\n\n## [`require.include`]\n\n`require.include` is removed entirely.\n\n```js\n// Before\nrequire.include('a');\n\n// After\n\n```\n\n## Motivation\n\n[`require.ensure`] and [`require.include`] are great for [code splitting][cs];\nhowever, they can cause issues when writing universal JavaScript. The typical\nsolution is to use synchronous shims. In order for [webpack] code splitting\nto work properly these shims have to be defined in each file where they are\nused.\n\nThis plugin makes it possible to universally run code which uses\n[webpack]-specific functions without having to manually polyfill those\nfunctions.\n\n## Usage Notes\n\nThis plugin should not be used as a part of a build with [webpack], otherwise\ncode splitting will stop working. The intended usage is with the\n[`babel-register`] package or some other build with babel that specifically\ntargets node. Usage as such will remove [`require.ensure`] and\n[`require.include`] calls as shown above so you can run your client code on the\nserver without shims.\n\n## License\n\nMIT\n\n[webpack]: http://webpack.github.io/ \"webpack\"\n[cs]: https://webpack.github.io/docs/code-splitting.html \"Code Splitting\"\n[`babel-register`]: https://www.npmjs.com/package/babel-register \"`babel-register`\"\n[IIFE]: https://en.wikipedia.org/wiki/Immediately-invoked_function_expression \"Immediately-Invoked Function Expression\"\n[`require.ensure`]: https://webpack.github.io/docs/code-splitting.html#require-ensure \"`require.ensure`\"\n[`require.include`]: https://webpack.github.io/docs/code-splitting.html#require-include \"`require.include`\"\n","maintainers":[{"email":"ken+knpwrs@kenpowers.net","name":"knpwrs"}],"time":{"modified":"2022-08-09T16:19:48.776Z","created":"2016-01-08T02:23:34.139Z","1.0.0":"2016-01-08T02:23:34.139Z","1.1.0":"2016-02-22T21:43:23.548Z"},"homepage":"https://github.com/knpwrs/babel-plugin-remove-webpack#readme","keywords":["babel-plugin","remove","webpack"],"repository":{"type":"git","url":"git+https://github.com/knpwrs/babel-plugin-remove-webpack.git"},"author":{"name":"Kenneth Powers","email":"ken@kenpowers.net","url":"http://knpw.rs"},"bugs":{"url":"https://github.com/knpwrs/babel-plugin-remove-webpack/issues"},"license":"MIT","readmeFilename":"README.md"}