{"_id":"@billypon/customize-cra","_rev":"2-85946fce16225af5b5fa350622eac5b9","name":"@billypon/customize-cra","dist-tags":{"latest":"0.7.1"},"versions":{"0.7.0":{"name":"@billypon/customize-cra","version":"0.7.0","description":"[![All Contributors](https://img.shields.io/badge/all_contributors-10-orange.svg?style=flat-square)](#contributors-)","repository":{"type":"git","url":"git+https://github.com/arackaf/customize-cra.git"},"main":"dist/index.cjs.js","module":"dist/index.esm.js","scripts":{"build":"npm run clean && rollup -c","clean":"rimraf dist","test":"jest","prepack":"npm run build","contributors:add":"all-contributors add","contributors:generate":"all-contributors generate"},"author":{"name":"Adam Rackis"},"license":"MIT","dependencies":{"lodash.flow":"^3.5.0"},"devDependencies":{"@babel/core":"^7.5.0","@babel/plugin-proposal-object-rest-spread":"^7.5.1","@babel/preset-env":"^7.5.0","@commitlint/cli":"^8.0.0","@commitlint/config-conventional":"^8.0.0","all-contributors-cli":"^6.8.1","babel-jest":"^24.8.0","husky":"^3.0.0","jest":"^24.8.0","rimraf":"^2.6.3","rollup":"^1.16.6","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-sourcemaps":"^0.4.2","rollup-plugin-terser":"^5.1.1"},"gitHead":"7c8f09b30c1b880ef17b90e5252c0506a4892431","bugs":{"url":"https://github.com/arackaf/customize-cra/issues"},"homepage":"https://github.com/arackaf/customize-cra#readme","_id":"@billypon/customize-cra@0.7.0","_npmVersion":"6.4.1","_nodeVersion":"8.14.0","_npmUser":{"name":"billypon","email":"billypon@gmail.com"},"dist":{"integrity":"sha512-bAnP6jAaKKrTaR+d3DiwHoQvzhIHXO8Io34aGmD0rfFzRCx5UfRnDsrCWr/tioQRlzZABBlUULhtk1Y29h0UmQ==","shasum":"7a0afc6e1740118b4ee945daeaf57beed6ce36d4","tarball":"https://registry.npmjs.org/@billypon/customize-cra/-/customize-cra-0.7.0.tgz","fileCount":7,"unpackedSize":63168,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdhN0eCRA9TVsSAnZWagAAjBcP+QEmTHihWo3SMWL0el2T\nWd2EcRSbOd6Fu0/dCt6Zn4l9SZ8Hoeu+6TszbT6BpqeGpQOByMNzzhS37IZz\nZrsdGLtL6fwPGCqL9bcl1/vVuKgQO4vHA/9OZ6OhDEopGElhy7f2QxfVILDj\n54LbNxFmK1Y2DJqiTbuvtXX1O60dd7kDwmXxeGUj2YdMrQql7yEyJQ39YWfJ\nTFfXv4ErLmJjAnFGrAO5pMsy7ZaDa9J7bw21OL3qAb14cYhIuQOLjDMvRV18\n8XC/B/plGWh78QQXR3ypu3GQmtah9s9m9iUg2OClzpnRp1fSdp/9RVQ6zNmQ\niJMsY7/3zoVYGUIc/t9Hv99KIeR8AWi+MW6gJpbcsFCHFPkOATN+oIXsBJU1\nkVjN4g33Js+P7jmBvGQ7nhFVaDKLm7ojxNEJ29auaOwqshz3CVK68/gk2zRK\ncvSLU3AoXmru5oVGSOYdfK+IJHUsAX02tsrNjTpIqU9sVIExBeZLHnIpoW5Z\nEof/2CjeBGN4frZYPQTVTI4HsUOrrUuvYX2IXH6Howy6Zoz7Nh54SrBobczV\naMyA7STm0CZhjLCQtIEF9SH8q/MFaYjvrEjrwigywPtrjRVja/pJGvDjB5nb\nbBW+askbEpy1uMohhZVXpXHHQ2mRxEB7j6MC8FdZBlrLptfDX9O3nzXwggxi\n8LCp\r\n=SK/k\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID5DwVdmgwJjOh7AR/J/VgnpMiZVUemj2oqR+euaAqdsAiAyds7m+OKNkW7LybWKHg8JvsjjnVEXVbvYaOux5q7jnA=="}]},"maintainers":[{"name":"billypon","email":"billypon@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/customize-cra_0.7.0_1568988445000_0.6493507978594713"},"_hasShrinkwrap":false},"0.7.1":{"name":"@billypon/customize-cra","version":"0.7.1","description":"[![All Contributors](https://img.shields.io/badge/all_contributors-10-orange.svg?style=flat-square)](#contributors-)","repository":{"type":"git","url":"git+https://github.com/arackaf/customize-cra.git"},"main":"dist/index.cjs.js","module":"dist/index.esm.js","scripts":{"build":"npm run clean && rollup -c","clean":"rimraf dist","test":"jest","prepack":"npm run build","contributors:add":"all-contributors add","contributors:generate":"all-contributors generate"},"author":{"name":"Adam Rackis"},"license":"MIT","dependencies":{"lodash.flow":"^3.5.0"},"devDependencies":{"@babel/core":"^7.5.0","@babel/plugin-proposal-object-rest-spread":"^7.5.1","@babel/preset-env":"^7.5.0","@commitlint/cli":"^8.0.0","@commitlint/config-conventional":"^8.0.0","all-contributors-cli":"^6.8.1","babel-jest":"^24.8.0","husky":"^3.0.0","jest":"^24.8.0","rimraf":"^2.6.3","rollup":"^1.16.6","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-sourcemaps":"^0.4.2","rollup-plugin-terser":"^5.1.1"},"gitHead":"2b20488bab8787cdb615ff758c785ad766c78139","bugs":{"url":"https://github.com/arackaf/customize-cra/issues"},"homepage":"https://github.com/arackaf/customize-cra#readme","_id":"@billypon/customize-cra@0.7.1","_npmVersion":"6.4.1","_nodeVersion":"8.14.0","_npmUser":{"name":"billypon","email":"billypon@gmail.com"},"dist":{"integrity":"sha512-tjJSpocpkOYeAKepoUe43Rz39Dm3m9IxpTns07QmRy8YcTSW41tvuK/Vq+T35BcKd8XNiCazdXDQQug6RyupkQ==","shasum":"414eaa8c066df2ad5984208c447801cceb3227ea","tarball":"https://registry.npmjs.org/@billypon/customize-cra/-/customize-cra-0.7.1.tgz","fileCount":7,"unpackedSize":63440,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdiPViCRA9TVsSAnZWagAA8+gP/Rj7nw/Y3aqz06Pr6kpz\nZRKYeyNP0oBp4yu3iXEnKk8liEZGml/v+FHqXHNDaIPJHCuJbWb4GIY76Ol4\n/tu4kNRtjJIKDuaTlpYWtRy3UDMdtYfqCnRAvuzgdmkVSRJu72MvYagmKRg2\nl4R+7jkgmFEqNDV9NRJavqZbyXSSaSqMvM/ZAZb7Ak8huKigqFBzm/4SaEyR\nC4SSdwRrlWr5jh9qB5xOvt/gw0MtKXLo/d3WbHWptW6kDVd0gAcv6eUxHNdP\ndCKAGYZWzxdsWl1cTgO43A1Nqd00EuMjjmEoEjA05SH7ExID8hy1+S/HkCcR\niPgVTBB2hrskq3ERZBMPqJLeeCgnkBYR29fDbN+hxyHfMkKvMYzCmIP4zVcN\nsIZAuCStJy2TM/PhwrMjYLStWedtUEM/9jR/8Md21HS2M7HVhanWBPnGkwVj\nVZF9hV7k4z6gbETJwP6NrfwHe3wDXOf6UyiI2cL4lKC0YUQYtFg52WGoLjPp\nhfca0BEe+76YqCTllC2Hp5TtKNGPX5mG0+r5BmtBhe8GfKUb7240lxQfDEy4\n2gdo7zQj/H2MZ8LQz4ulCxcDKEm7mg7DGfF0/TbRgBP5zAT2l2y4MJZMGvOM\nXS/3SpQQO/VPRZ/4pPD6AVGHzu6deR8m2KkyVGL87Tkem5F1kIpQ9RgrdVVr\nTFbt\r\n=Fq+g\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHm8fm92uliHH4hllBYFJuxFqpC628jLz1DvvqHZrNaVAiBHqSyepC17eOnMJSUJRfrxjMkjzWVmcVYpjluSa34yrg=="}]},"maintainers":[{"name":"billypon","email":"billypon@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/customize-cra_0.7.1_1569256801854_0.9332635737770909"},"_hasShrinkwrap":false}},"time":{"created":"2019-09-20T14:07:24.750Z","0.7.0":"2019-09-20T14:07:25.123Z","modified":"2022-04-04T18:51:01.087Z","0.7.1":"2019-09-23T16:40:02.057Z"},"maintainers":[{"name":"billypon","email":"billypon@gmail.com"}],"description":"[![All Contributors](https://img.shields.io/badge/all_contributors-10-orange.svg?style=flat-square)](#contributors-)","homepage":"https://github.com/arackaf/customize-cra#readme","repository":{"type":"git","url":"git+https://github.com/arackaf/customize-cra.git"},"author":{"name":"Adam Rackis"},"bugs":{"url":"https://github.com/arackaf/customize-cra/issues"},"license":"MIT","readme":"# `customize-cra`\n\n[![All Contributors](https://img.shields.io/badge/all_contributors-10-orange.svg?style=flat-square)](#contributors-)\n\nThis project provides a set of utilities to customize [`create-react-app`](https://github.com/facebook/create-react-app) versions 2 and 3 configurations leveraging [`react-app-rewired`](https://github.com/timarney/react-app-rewired/) core functionalities.\n\n- [How to install](#how-to-install)\n- [Warning](#warning)\n- [Overview](#overview)\n- [Usage](#usage)\n  - [With `webpack`](#with-webpack)\n  - [With `webpack-dev-server`](#with-webpack-dev-server)\n  - [With `MobX`](#with-mobx)\n- [Documentation](#documentation)\n- [Contributing](#contributing)\n- [Contributors](#contributors)\n\n## How to install\n\nThis project relies on [`react-app-rewired`](https://github.com/timarney/react-app-rewired/). You'll need to install that in order for `customize-cra` to work.\n\n```bash\nyarn add customize-cra react-app-rewired --dev\n```\n\n## ❗ Warning\n\n> \"Stuff can break\"\n> \\- Dan Abramov\n\nUsing this library will override the default behavior and configuration of `create-react-app`, therefore invalidating the guarantees that come with it. Use with discretion!\n\n## Overview\n\n`customize-cra` takes advantage of `react-app-rewired`'s `config-overrides.js` file. By importing `customize-cra` functions and exporting a few function calls wrapped in our `override` function, you can easily modify the underlying config objects (`webpack`, `webpack-dev-server`, `babel`, etc.) that make up `create-react-app`.\n\n## Usage\n\n**Note:** all code should be added to `config-overrides.js` at the same level as `package.json`.\n\nSee the [api docs](api.md) for documentation for each function.\n\n### With `webpack`\n\nTo use these plugins, import the `override` function, and call it with whatever plugins you need. Each of these plugin invocations will return a new function, that `override` will call with the newly modified config object. Falsy values will be ignored though, so if you need to conditionally apply any of these plugins, you can do so like below.\n\nFor example:\n\n```js\nconst {\n  override,\n  addDecoratorsLegacy,\n  disableEsLint,\n  addBundleVisualizer,\n  addWebpackAlias,\n  adjustWorkbox\n} = require(\"customize-cra\");\nconst path = require(\"path\");\n\nmodule.exports = override(\n  // enable legacy decorators babel plugin\n  addDecoratorsLegacy(),\n\n  // disable eslint in webpack\n  disableEsLint(),\n\n  // add webpack bundle visualizer if BUNDLE_VISUALIZE flag is enabled\n  process.env.BUNDLE_VISUALIZE == 1 && addBundleVisualizer(),\n\n  // add an alias for \"ag-grid-react\" imports\n  addWebpackAlias({\n    [\"ag-grid-react$\"]: path.resolve(__dirname, \"src/shared/agGridWrapper.js\")\n  }),\n\n  // adjust the underlying workbox\n  adjustWorkbox(wb =>\n    Object.assign(wb, {\n      skipWaiting: true,\n      exclude: (wb.exclude || []).concat(\"index.html\")\n    })\n  )\n);\n```\n\n### With `webpack-dev-server`\n\nYou can use the `overrideDevServer` function to override the `webpack-dev-server` config. It works the same way as `override`:\n\n```js\nconst {\n  override,\n  disableEsLint,\n  overrideDevServer,\n  watchAll\n} = require(\"customize-cra\");\n\nmodule.exports = {\n  webpack: override(\n    // usual webpack plugin\n    disableEsLint()\n  ),\n  devServer: overrideDevServer(\n    // dev server plugin\n    watchAll()\n  )\n};\n```\n\n### With `MobX`\n\nIf you want CRA 2 to work with MobX, use the `addDecoratorsLegacy` and `disableEsLint`.\n\n## Documentation\n\n[See `api.md`](api.md) for documentation on the functions provided by `customize-cra`.\n\n## Contributing\n\nFor more information about contributing to this project, like a directory map or a how-to for reporting an issue about the project, please [`see contributing.md`](contributing.md).\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable -->\n<table>\n  <tr>\n    <td align=\"center\"><a href=\"https://github.com/dqu\"><img src=\"https://avatars2.githubusercontent.com/u/4287468?v=4\" width=\"100px;\" alt=\"dqu\"/><br /><sub><b>dqu</b></sub></a><br /><a href=\"#question-dqu\" title=\"Answering Questions\">💬</a></td>\n    <td align=\"center\"><a href=\"https://blog.breezelin.cn\"><img src=\"https://avatars2.githubusercontent.com/u/5266711?v=4\" width=\"100px;\" alt=\"Breeze\"/><br /><sub><b>Breeze</b></sub></a><br /><a href=\"https://github.com/arackaf/customize-cra/commits?author=breeze2\" title=\"Code\">💻</a></td>\n    <td align=\"center\"><a href=\"https://github.com/Terryand\"><img src=\"https://avatars2.githubusercontent.com/u/22273687?v=4\" width=\"100px;\" alt=\"Terryand\"/><br /><sub><b>Terryand</b></sub></a><br /><a href=\"https://github.com/arackaf/customize-cra/commits?author=Terryand\" title=\"Code\">💻</a></td>\n    <td align=\"center\"><a href=\"https://github.com/m-weeks\"><img src=\"https://avatars0.githubusercontent.com/u/37918120?v=4\" width=\"100px;\" alt=\"m-weeks\"/><br /><sub><b>m-weeks</b></sub></a><br /><a href=\"https://github.com/arackaf/customize-cra/issues?q=author%3Am-weeks\" title=\"Bug reports\">🐛</a></td>\n    <td align=\"center\"><a href=\"https://github.com/wuchaoya\"><img src=\"https://avatars2.githubusercontent.com/u/20284675?v=4\" width=\"100px;\" alt=\"吴超\"/><br /><sub><b>吴超</b></sub></a><br /><a href=\"#example-wuchaoya\" title=\"Examples\">💡</a></td>\n    <td align=\"center\"><a href=\"http://jamesthistlewood.co.uk\"><img src=\"https://avatars3.githubusercontent.com/u/8274049?v=4\" width=\"100px;\" alt=\"James Thistlewood\"/><br /><sub><b>James Thistlewood</b></sub></a><br /><a href=\"https://github.com/arackaf/customize-cra/commits?author=jthistle\" title=\"Code\">💻</a></td>\n    <td align=\"center\"><a href=\"https://github.com/taddj\"><img src=\"https://avatars1.githubusercontent.com/u/48697700?v=4\" width=\"100px;\" alt=\"taddj\"/><br /><sub><b>taddj</b></sub></a><br /><a href=\"#question-taddj\" title=\"Answering Questions\">💬</a></td>\n  </tr>\n  <tr>\n    <td align=\"center\"><a href=\"https://github.com/postgetme\"><img src=\"https://avatars3.githubusercontent.com/u/5118867?v=4\" width=\"100px;\" alt=\"MeiLin\"/><br /><sub><b>MeiLin</b></sub></a><br /><a href=\"https://github.com/arackaf/customize-cra/commits?author=postgetme\" title=\"Code\">💻</a></td>\n    <td align=\"center\"><a href=\"https://github.com/badgerwithagun\"><img src=\"https://avatars0.githubusercontent.com/u/6483013?v=4\" width=\"100px;\" alt=\"Graham Crockford\"/><br /><sub><b>Graham Crockford</b></sub></a><br /><a href=\"#ideas-badgerwithagun\" title=\"Ideas, Planning, & Feedback\">🤔</a></td>\n    <td align=\"center\"><a href=\"https://github.com/gfafei\"><img src=\"https://avatars3.githubusercontent.com/u/12234890?v=4\" width=\"100px;\" alt=\"afei\"/><br /><sub><b>afei</b></sub></a><br /><a href=\"https://github.com/arackaf/customize-cra/commits?author=gfafei\" title=\"Code\">💻</a></td>\n  </tr>\n</table>\n\n<!-- markdownlint-enable -->\n<!-- prettier-ignore-end -->\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n","readmeFilename":"readme.md"}