{"_id":"@achmadk/vite-plugin-react-remove-devtools","_rev":"1-2f862e9c5ac8a49bce6e4f58f7564c86","name":"@achmadk/vite-plugin-react-remove-devtools","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@achmadk/vite-plugin-react-remove-devtools","version":"1.0.0","type":"module","module":"./dist/index.js","main":"./dist/index.umd.cjs","types":"./dist/main.d.ts","typings":"./dist/main.d.ts","exports":{".":{"types":"./dist/main.d.ts","require":"./dist/index.umd.cjs","import":"./dist/index.js"}},"scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview","prepublishOnly":"pnpm run build"},"devDependencies":{"@types/node":"^20.4.5","typescript":"^4.9.5","vite":"^4.4.7","vite-plugin-dts":"^3.4.0"},"peerDependencies":{"vite":"^4.4.7"},"keywords":["react","vite","vite-plugin"],"dependencies":{"@scarf/scarf":"^1.1.1"},"_id":"@achmadk/vite-plugin-react-remove-devtools@1.0.0","gitHead":"6102a6c00da4605663b6f020efd030305a7b10d6","description":"1. [Description](#memo-description)\r 1. [Prerequisites](#prerequisites)\r 1. [Installation](#wrench-installation)\r 1. [Usages](#bike-usages)\r 1. [Inspirations](#💡-inspirations)\r 1. [License](#🪪-license)","_nodeVersion":"18.17.0","_npmVersion":"9.8.1","dist":{"integrity":"sha512-iGAGQ6j134Qmjo/19ezChZrcByopjLWeb8KkW+zQ89oLMr2B6RctL6LJrdqm+J+jhGluVh7yYSLIY0/REHxQJQ==","shasum":"e7a634234884487131d69f7ed156df3a89ead30f","tarball":"https://registry.npmjs.org/@achmadk/vite-plugin-react-remove-devtools/-/vite-plugin-react-remove-devtools-1.0.0.tgz","fileCount":8,"unpackedSize":8984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBqmwEFWP0ixQFAesq3TudQvTMuytIYj3bqnRAPBcfy4AiAcrhKXPNJm30mpeOXf5OmAuf4ya0KW7mBOshrKxwq30g=="}]},"_npmUser":{"name":"achmadkurnianto","email":"achmad.kurnianto@gmail.com"},"directories":{},"maintainers":[{"name":"achmadkurnianto","email":"achmad.kurnianto@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vite-plugin-react-remove-devtools_1.0.0_1690789424845_0.08709874128784167"},"_hasShrinkwrap":false},"1.1.0":{"name":"@achmadk/vite-plugin-react-remove-devtools","version":"1.1.0","type":"module","module":"./dist/index.js","main":"./dist/index.umd.cjs","types":"./dist/main.d.ts","typings":"./dist/main.d.ts","exports":{".":{"types":"./dist/main.d.ts","require":"./dist/index.umd.cjs","import":"./dist/index.js"}},"scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview","prepublishOnly":"pnpm run build"},"devDependencies":{"@types/node":"^20.4.5","typescript":"^4.9.5","vite":"^4.4.7","vite-plugin-dts":"^3.4.0"},"peerDependencies":{"vite":"^4.4.7"},"keywords":["react","vite","vite-plugin"],"dependencies":{"@scarf/scarf":"^1.1.1"},"repository":{"type":"git","url":"git+https://github.com/achmadk/vite-plugin-react-remove-devtools.git"},"license":"MIT","_id":"@achmadk/vite-plugin-react-remove-devtools@1.1.0","gitHead":"ce037c21ea13be41fd7de2222dec5ec44e8ff160","description":"1. [Description](#memo-description)\r 1. [Prerequisites](#prerequisites)\r 1. [Installation](#wrench-installation)\r 1. [Usages](#bike-usages)\r 1. [Inspirations](#💡-inspirations)\r 1. [License](#🪪-license)","bugs":{"url":"https://github.com/achmadk/vite-plugin-react-remove-devtools/issues"},"homepage":"https://github.com/achmadk/vite-plugin-react-remove-devtools#readme","_nodeVersion":"18.17.0","_npmVersion":"9.8.1","dist":{"integrity":"sha512-w3t32dVroyS8NVxQKXRO+hT2Q112nTDMm+F+4AYndXDvzWA4U7K8JGmCI52ZSC9uzKLxlM4zSSVqb/jL/ZHBCQ==","shasum":"a779b93b5fc04b30502439e6f3fb26d0577e4636","tarball":"https://registry.npmjs.org/@achmadk/vite-plugin-react-remove-devtools/-/vite-plugin-react-remove-devtools-1.1.0.tgz","fileCount":8,"unpackedSize":9065,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDpkvXanyRvT74hWKz+QJiAnVmdk50Khzq5MsJiq8dijQIhALMppSmF7MurMxPlhTxAZLbyEBLXk9uVuRlUWfZlgw77"}]},"_npmUser":{"name":"achmadkurnianto","email":"achmad.kurnianto@gmail.com"},"directories":{},"maintainers":[{"name":"achmadkurnianto","email":"achmad.kurnianto@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vite-plugin-react-remove-devtools_1.1.0_1690789759587_0.6005106433858709"},"_hasShrinkwrap":false}},"time":{"created":"2023-07-31T07:43:44.771Z","1.0.0":"2023-07-31T07:43:45.045Z","modified":"2023-07-31T07:49:20.306Z","1.1.0":"2023-07-31T07:49:20.189Z"},"maintainers":[{"name":"achmadkurnianto","email":"achmad.kurnianto@gmail.com"}],"description":"1. [Description](#memo-description)\r 1. [Prerequisites](#prerequisites)\r 1. [Installation](#wrench-installation)\r 1. [Usages](#bike-usages)\r 1. [Inspirations](#💡-inspirations)\r 1. [License](#🪪-license)","keywords":["react","vite","vite-plugin"],"readme":"# :package: `@achmadk/vite-plugin-react-remove-devtools`\r\n\r\n## Table of Contents\r\n1. [Description](#memo-description)\r\n1. [Prerequisites](#prerequisites)\r\n1. [Installation](#wrench-installation)\r\n1. [Usages](#bike-usages)\r\n1. [Inspirations](#💡-inspirations)\r\n1. [License](#🪪-license)\r\n\r\n## :memo: Description\r\nHey there! :clap:\r\n\r\n`@achmadk/vite-plugin-react-remove-devtools` is this cool Vite plugin that lets us keep the React DevTools indicator hidden, even when using the React library to build our web app. Pretty neat, huh?\r\n\r\nJust a quick heads up - this plugin is specifically designed for Vite and not for Rollup. Here's why:\r\n\r\n1. The plugin is called with the `pre` enforce value.\r\n2. It's activated only when you use the `vite build` command.\r\n\r\nHope this helps! 😊\r\n\r\n## Prerequisites\r\nBefore we get started, make sure you have these essentials ready:\r\n\r\n1. The most recent LTS version of Node (v18) 🌐\r\n2. If you're using a package manager other than `npm`, grab the latest version of your favorite one (`yarn`, `pnpm`) 📦\r\n3. Don't forget to install the newest version of Vite (v4) ⚡\r\n\r\nHappy coding! 🚀\r\n\r\n## :wrench: Installation\r\nJust type this command like this\r\n\r\n```bash\r\nnpm i @achmadk/vite-plugin-react-remove-devtools # npm\r\nyarn add @achmadk/vite-plugin-react-remove-devtools # yarn\r\npnpm add @achmadk/vite-plugin-react-remove-devtools # pnpm\r\n```\r\n\r\ninto your favorite CLI, and you'll be all set. 😊\r\n\r\n## :bike: Usages\r\n\r\nLet's go ahead and add `removeReactDevtools` method from `@achmadk/vite-plugin-react-remove-devtools` to your Vite config. It's super easy! 😊\r\n\r\n```ts\r\nimport { defineConfig } from 'vite'\r\nimport react from '@vitejs/plugin-react' // or import react from '@vitejs/plugin-react-swc'\r\nimport { removeReactDevtools } from '@achmadk/vite-plugin-react-remove-devtools'\r\n\r\nexport default defineConfig({\r\n  plugins: [\r\n    removeReactDevtools(),\r\n    react()\r\n  ]\r\n})\r\n```\r\n\r\nJust so you know, the `removeReactDevtools` method has an option with the same name, `removeReactDevtools`, which is set to `true` by default. If you'd like, you can change its value to `false`. 😊\r\n\r\n```diff\r\nexport default defineConfig({\r\n  plugins: [\r\n-    removeReactDevtools(),\r\n+    removeReactDevtools({ removeReactDevtools: false }),\r\n    react()\r\n  ]\r\n})\r\n```\r\n\r\n## 💡 Inspirations\r\nHey there! I just wanted to give a big thumbs up to the fantastic [vite-preset-react](https://github.com/PuruVJ/vite-preset-react) plugin by [Puru Vijay](https://github.com/PuruVJ). I borrowed the source code for the remove react devtools feature from it to create this plugin. 😊 By the way, I accidentally included Puru's MIT license in the LICENSE file instead of mine. My bad!\r\n\r\n## 🪪 License\r\n[MIT](./LICENSE)\r\n","readmeFilename":"README.md","homepage":"https://github.com/achmadk/vite-plugin-react-remove-devtools#readme","repository":{"type":"git","url":"git+https://github.com/achmadk/vite-plugin-react-remove-devtools.git"},"bugs":{"url":"https://github.com/achmadk/vite-plugin-react-remove-devtools/issues"},"license":"MIT"}