{"_id":"babel-plugin-no-side-effect-class-properties","_rev":"11-cd2e03ea9d5d26c984b6c788fdce4a77","name":"babel-plugin-no-side-effect-class-properties","dist-tags":{"latest":"0.0.7"},"versions":{"0.0.4":{"name":"babel-plugin-no-side-effect-class-properties","version":"0.0.4","keywords":["babel-plugin","tree-shaking","static","babel","pure","tree shaking","uglify","class properties"],"author":{"name":"Daybrush"},"license":"MIT","_id":"babel-plugin-no-side-effect-class-properties@0.0.4","maintainers":[{"name":"younkue","email":"daybrush@gmail.com"}],"homepage":"https://github.com/daybrush/babel-plugin-no-side-effect-class-properties#readme","bugs":{"url":"https://github.com/daybrush/babel-plugin-no-side-effect-class-properties/issues"},"dist":{"shasum":"f80ac5434fc807813009e178ad0f06a535ad1b85","tarball":"https://registry.npmjs.org/babel-plugin-no-side-effect-class-properties/-/babel-plugin-no-side-effect-class-properties-0.0.4.tgz","fileCount":5,"integrity":"sha512-ny5HArr1hvL7wRMszULtj6XR3MTIblc16WGCEfdnpTJiXQpLPLzte/kjjdNX4zFhsO6kSRI7DcOkqAQxMbryZQ==","signatures":[{"sig":"MEYCIQDGWuCCipxwaf1A7wIA7iPb0pOuXPSTiLHpiMXP8AQ5BgIhAOEm8SEt82VP2spznAGWfVGXG6rtSjCX5xEj6hnKCGcW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5502,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbugPVCRA9TVsSAnZWagAAdMMP+wVmHUl2g7+B3CuDU1iB\nuEDtyeXocSHHZqfwia1Z+fRr9iir4HxnWrnftWUBzrisbCZPR4HEw0stvofT\n8G68FwSQrkVrBSAJ9PykjVYyPA6PndCywR+ToIuI3VWqv6i3fgYES8Frtpmm\n99Tou3EbkvmhUJZ6HzQeiqY5i9BzG4kEOAmPOhSarqAZLQgS9eJNzQRokHVk\n5u1BwVZZFNHeemKmMj1SLJjZ5xxzjBKinY81IKUZyHS/6cwpGa1GS/z6Az/g\n+hehHfPQvtp9TtdMuCXMywfzdzXNeWu6lU8FfF6dAbPQ6Mx1vDlBaHoJJVWR\ne2WJVfYH/BhVPknOUEoZEfkQjvEuCqUG1m3706M9aqPFHkv/l7rl9AYePj2r\n83XvO9/xXDdoqxehh4aGG5wG6Zl6zThvdW3EvVKdXOJ4CGKc1pcrq1WosWvU\nQV9tsCG5HPVwUbkxgQUG6l5kIAL318sX+efEwoC8Xy342TtbnM54LcKnny/x\nGg3ae4/PkWfWBm+0AtiH5LUVOp8kPMLvCUAID6OEsJSt+5e61OcdIuU5Azqe\n8d1VSxHHml+pEAFpKekaVW1fv2hxJ0Bfb0aYtX7Ggn5E9f+z0iB07ilBnUv1\nifZ7RXV9CMkAsuRx+sPVTBvoc7SueRksmwipgZIxcvHk78U2CJ8zlNYFFPX+\nQQiH\r\n=1TAL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"272e8e7784c753bf6bf5205dd7fd8d6b1fd82d4e","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"babel src/index.js --out-dir lib"},"_npmUser":{"name":"younkue","email":"daybrush@gmail.com"},"repository":{"url":"git+https://github.com/daybrush/babel-plugin-no-side-effect-class-properties.git","type":"git"},"_npmVersion":"5.7.1","description":"This plugin transforms static class properties as well as properties declared with the property initializer syntax","directories":{},"_nodeVersion":"9.9.0","dependencies":{"@babel/cli":"^7.0.0","@babel/core":"^7.0.0","@babel/preset-env":"^7.0.0","@babel/helper-function-name":"^7.0.0","@babel/helper-annotate-as-pure":"^7.0.0","@babel/plugin-syntax-class-properties":"^7.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/babel-plugin-no-side-effect-class-properties_0.0.4_1538917333113_0.8902464305408786","host":"s3://npm-registry-packages"}},"0.0.5":{"name":"babel-plugin-no-side-effect-class-properties","version":"0.0.5","keywords":["babel-plugin","tree-shaking","static","babel","pure","tree shaking","uglify","class properties"],"author":{"name":"Daybrush"},"license":"MIT","_id":"babel-plugin-no-side-effect-class-properties@0.0.5","maintainers":[{"name":"younkue","email":"daybrush@gmail.com"}],"homepage":"https://github.com/daybrush/babel-plugin-no-side-effect-class-properties#readme","bugs":{"url":"https://github.com/daybrush/babel-plugin-no-side-effect-class-properties/issues"},"dist":{"shasum":"6770db0a5e0e0c2b1c56a1f250708a66cf648952","tarball":"https://registry.npmjs.org/babel-plugin-no-side-effect-class-properties/-/babel-plugin-no-side-effect-class-properties-0.0.5.tgz","fileCount":5,"integrity":"sha512-V3rbL8Nso2PKkOs0OeIeRC0qAZEeqA3KmDIRYdWf4I7vSBGxSajhAti/BzAhJCIbOtznMctuAmWj83mk2OrZSA==","signatures":[{"sig":"MEUCIQC+DGC61P3QNlycvV+chc4ZmYrljzPukDuwBJoKaPjO1wIgPl0N87rLRwAERpp8lCqtrqasImUJat65mZxi28j4hAs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5644,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb86LnCRA9TVsSAnZWagAALWIP/2rzwxnHUqftAXYkPazK\n9gXAytsitVLhVu2zbAoZ29h/oVKG/VpRPYRsQN924HwRENCh0Maq6u3pezth\nuvc8Zw69tXvOiOiq8+WfYSmmdMSWknVEVP1D+LLSl7OciGKDA+oTYSev++yu\nztWKlpTzB6wQInvsvp6zEuQQ5WMcWYiItJfI5OuvA8f3NRsFk29zAXxEVXsM\nyTUDrRYgoRKX1oerKBOSmo4CJDExHaJeM3xkmpSxQuQsrrgYffobTvA2dyc6\nrmN19IXpMJx/EF3jqPd80ONp2tsqcYHvPZd1vk9QxLRDjlUSR+CaW2aiTAsq\nq3m1A7WoYCuuDeVEqa3eERObUO5c7pgHI4VA4rbQEPuG4GX7BSzaqgnlJ/gj\nbLgRZp1VXhgc1z8eJehMyqJgNEGuuHmcwrabn5iUqaw7suDVACmUh91Bh6wL\n/NVqJ1x1WUSEtgf5/QuddQbBG8YvpJjMKsE/UjZSFHHGNzrw9Q6uG2OP8r8B\nPmN1MQQqTEEoHnNr2Lrvw5cP7os6uFH3ZQnN3Ga4/HQDJn5Jy3u4iTDFnD6h\n8SkGsAf/UPS2DydykPXtNIpvAMcyWBo9D3YllSQlVPtTeK8UD22msP4xSaOm\nsdwlkReA0ZGOTwOrjvzBUqAhRazsBSAFUA/sI1J0tP2pK54cImlX7hu40hf/\nTr+N\r\n=U4X/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"4c85c4bf031daf7b8ff14ee2aac43a0084b6029c","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"babel src/index.js --out-dir lib"},"_npmUser":{"name":"younkue","email":"daybrush@gmail.com"},"repository":{"url":"git+https://github.com/daybrush/babel-plugin-no-side-effect-class-properties.git","type":"git"},"_npmVersion":"5.7.1","description":"This plugin transforms static class properties as well as properties declared with the property initializer syntax","directories":{},"_nodeVersion":"11.0.0","dependencies":{"@babel/cli":"^7.0.0","@babel/core":"^7.0.0","@babel/preset-env":"^7.0.0","@babel/helper-function-name":"^7.0.0","@babel/helper-annotate-as-pure":"^7.0.0","@babel/plugin-syntax-class-properties":"^7.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/babel-plugin-no-side-effect-class-properties_0.0.5_1542693606038_0.3184917805083274","host":"s3://npm-registry-packages"}},"0.0.6":{"name":"babel-plugin-no-side-effect-class-properties","version":"0.0.6","keywords":["babel-plugin","tree-shaking","static","babel","pure","tree shaking","uglify","class properties"],"author":{"name":"Daybrush"},"license":"MIT","_id":"babel-plugin-no-side-effect-class-properties@0.0.6","maintainers":[{"name":"younkue","email":"daybrush@gmail.com"}],"homepage":"https://github.com/daybrush/babel-plugin-no-side-effect-class-properties#readme","bugs":{"url":"https://github.com/daybrush/babel-plugin-no-side-effect-class-properties/issues"},"dist":{"shasum":"0619d05874c3dba9c46b96800d67abc13d343de6","tarball":"https://registry.npmjs.org/babel-plugin-no-side-effect-class-properties/-/babel-plugin-no-side-effect-class-properties-0.0.6.tgz","fileCount":5,"integrity":"sha512-u4BglUSNlKyIdxwKtVCXoU26BUFj6ggNkzb4qfV5kicwkBx6VxLNbcA6Q2jf0PIb71PFynz4ggn6HeCY1zuicw==","signatures":[{"sig":"MEUCIQCmWLHpvAGyMUxB8B+MsnUk/akmr7SAGq3z6hC4KEINPAIgcFORQGGcS8HlIthQeoDJFKxbZDS48rHa7ZxdDwrvVBE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5807,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb86TzCRA9TVsSAnZWagAA9X4P/2LXmRNbajZgDt1giQe/\n01KAm3/ZIpWAqRBAnfaw8nmTiDqb9WE16rgjmE3mcBiBF0WFPVBvmEjHARYi\n7jqM+N2no/joB4/61T+gE1dmNnfnX8Prhpp34plMp4otfDkfodmhpXDPmIwX\nWChD+XWVBvLbSvln4g16yoqCeahnVkGISJKTp5dkA/9uI/FLbc71N65TPPeM\nC7yfqLPJg65YZHeoF1GcEcvfmy2J6r+9i10wnicK/gLOtDMb2GHAk/NjXNUy\nt+5bWPeclIuMnzUBwbbC7EDcDAiZ4ljylm0aN6Z6eNM1vuHUevrqH8yRHSG/\nri07H1EAY7SrdgzmWWX5QimXiKEWZcLXbn35G8g5GwS+wXGLIdbNAk4y+aAl\ngKT9/B3xi1CqItFJoVSUxzJCQpKgYH6iefDPIyMKvifuZ9B3I6mXL2D5rnp5\nqwTn4ioGi/ulQNhhuRfD4AF3VOIvJ0KLcgcI1xbMKM/D+ytXgPEGV4Xx60mN\nkDar/giVe2JVK1d2FU/4z71CQM6Wn4hAjzBgczUf+HvZCcAeR1LIAcnLgDB8\nWRr0QmdLv42k6eVv24v/fxfjj+qLSt4pRJqzXHqj7V0YdxUMyRGx+NB8R3qX\nWZpuqMVBbYtp6YNzWWWN0ko7k0wDi3evntKEuYXQF6I8PoGFffm0uzBLIZTc\nmtCM\r\n=eUqX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"4c85c4bf031daf7b8ff14ee2aac43a0084b6029c","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"babel src/index.js --out-dir lib"},"_npmUser":{"name":"younkue","email":"daybrush@gmail.com"},"repository":{"url":"git+https://github.com/daybrush/babel-plugin-no-side-effect-class-properties.git","type":"git"},"_npmVersion":"5.7.1","description":"This plugin transforms static class properties as well as properties declared with the property initializer syntax","directories":{},"_nodeVersion":"11.0.0","dependencies":{"@babel/cli":"^7.0.0","@babel/core":"^7.0.0","@babel/preset-env":"^7.0.0","@babel/helper-function-name":"^7.0.0","@babel/helper-annotate-as-pure":"^7.0.0","@babel/plugin-syntax-class-properties":"^7.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/babel-plugin-no-side-effect-class-properties_0.0.6_1542694131403_0.8491935075948107","host":"s3://npm-registry-packages"}},"0.0.7":{"name":"babel-plugin-no-side-effect-class-properties","version":"0.0.7","keywords":["babel-plugin","tree-shaking","static","babel","pure","tree shaking","uglify","class properties"],"author":{"name":"NAVER Corp"},"license":"MIT","_id":"babel-plugin-no-side-effect-class-properties@0.0.7","maintainers":[{"name":"younkue","email":"daybrush@gmail.com"}],"homepage":"https://github.com/naver/babel-plugin-no-side-effect-class-properties","bugs":{"url":"https://github.com/naver/babel-plugin-no-side-effect-class-properties/issues"},"dist":{"shasum":"5ef38cffb9ccd20e1bacdf2a94b91f67e0845e2b","tarball":"https://registry.npmjs.org/babel-plugin-no-side-effect-class-properties/-/babel-plugin-no-side-effect-class-properties-0.0.7.tgz","fileCount":6,"integrity":"sha512-dx9khAaxpIDcMo/jp2ITsvKM/BrOSt3OhAQfVJ4SiYm+ErMGbovk+vv89tHSJDDJacrr9YpvAhJFgCp+gBSN2w==","signatures":[{"sig":"MEUCIQDGQS1FD3p1/lT3BRObDi4PqmGvwvNAdUzi43SoJlHufQIgPV35mPaiHcqYoLeZtIOqcWYmtYxq9OKc8+7pCB7RsOU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8993,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcD0CrCRA9TVsSAnZWagAA74AQAJWnlu9cHufgMl1yw8J7\nc3clT1sfWukWRbK5mGGAF5JJNasfdcGrmHG0AaY8xzu9Z3bVDMyykUeLKo/r\nRXmz9ZsVml9wSD2eWAsBvDhHRuuef+T0oxhMQrkTOYAoj8g7mHmwtvGqtHjL\n6u3D85G+2ELBImtj7m4wKnqt21QuQDyuuw2gT2nCIIL8LwNX7V1yjKBLAfwu\nUruo3JnY4pUpW938vYL7eag6CVfN5Q7Q6iQIwlG0ravcef0WCM2K+A8S27w5\n2Nybeup1/e4JvYWxrIR6reZ/v+WIEiuQyAabmDIqS+IZx5XEUMz6vPSC5D7U\n+AUsXJTQI45j0DD8w8ed7srCiyeofL0WSZaRs4ggEAdgSWdIImnXRMQaVzFs\nuxTLZMEkl8TcJfFgLiUTOXSvYSaO36+qt9IwvJ+4DWph/qQ7f8rLd1ZFr1ti\nClqafb0t02sq8uzgLoWSUnpk66uVwFRKLjvQcdBVP1sysUVfBk2R8M8CpKYA\nkdFe+kIBhY9pKKJdf1VgXgeSJoaEl9urJC5ZXcT7oreFkINM7SYSer4JRlat\nBkQTO3LI5bA2vlUn31jg1TPONE/Auz5g62ImSrKcIqk/c22yAOlriGoAKnfq\nKpOp8hMBlQPvKlhUgxMoXPtt6R3zmWbyc+/fCLvw7a4o4PzSiFQ2MNWMQ0F7\nLrcm\r\n=Ewiw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"3f328b81940174bdbcaaa0d5d24d680e9b826f9e","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"babel src/index.js --out-dir lib"},"_npmUser":{"name":"younkue","email":"daybrush@gmail.com"},"repository":{"url":"git+https://github.com/naver/babel-plugin-no-side-effect-class-properties.git","type":"git"},"_npmVersion":"5.7.1","description":"This plugin transforms static class properties so that side effects do not occur.","directories":{},"_nodeVersion":"11.0.0","dependencies":{"@babel/cli":"^7.0.0","@babel/core":"^7.0.0","@babel/preset-env":"^7.0.0","@babel/helper-function-name":"^7.0.0","@babel/helper-annotate-as-pure":"^7.0.0","@babel/plugin-syntax-class-properties":"^7.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/babel-plugin-no-side-effect-class-properties_0.0.7_1544503466855_0.4002032244659157","host":"s3://npm-registry-packages"}}},"time":{"created":"2018-10-07T13:02:12.948Z","modified":"2025-10-24T06:50:22.765Z","0.0.4":"2018-10-07T13:02:13.216Z","0.0.5":"2018-11-20T06:00:06.425Z","0.0.6":"2018-11-20T06:08:51.521Z","0.0.7":"2018-12-11T04:44:26.989Z"},"bugs":{"url":"https://github.com/naver/babel-plugin-no-side-effect-class-properties/issues"},"author":{"name":"NAVER Corp"},"license":"MIT","homepage":"https://github.com/naver/babel-plugin-no-side-effect-class-properties","keywords":["babel-plugin","tree-shaking","static","babel","pure","tree shaking","uglify","class properties"],"repository":{"url":"git+https://github.com/naver/babel-plugin-no-side-effect-class-properties.git","type":"git"},"description":"This plugin transforms static class properties so that side effects do not occur.","maintainers":[{"email":"ajaxpf@gmail.com","name":"ajaxpf"},{"email":"jongmoon.yoon@navercorp.com","name":"jongmoon"},{"email":"sculove@gmail.com","name":"sculove"},{"email":"heejae.kim@navercorp.com","name":"happyhj"},{"email":"ahnyoujin916@gmail.com","name":"anuu0916"},{"email":"i.nevalose@gmail.com","name":"mixed"},{"email":"alberto.park@gmail.com","name":"netil"},{"email":"daybrush@gmail.com","name":"younkue"},{"email":"saiyu915@naver.com","name":"woodneck"},{"email":"malangfox@naver.com","name":"braixen"},{"email":"cjw783@gmail.com","name":"cjw783"},{"email":"gyuwonlee.olivia@gmail.com","name":"gyutato"}],"readme":"# babel-plugin-no-side-effect-class-properties [![npm version](https://badge.fury.io/js/babel-plugin-no-side-effect-class-properties.svg)](https://badge.fury.io/js/babel-plugin-no-side-effect-class-properties)\n\n> [Tree Shaking is a way to remove the code if it is not used.](https://medium.com/naver-fe-platform/tree-shaking-in-webpack-50fa2ca446f1)\n>\n> However, if you use the static class properties, you do not have to use that code. This is because side effects occur.\n>\n> If use class properties and have no side effects, use this plugin.\n>\n> This plugin transforms static class properties so that side effects do not occur.\n\n* Before Transpile\n```js\nexport default class A {\n  static a = 1;\n}\n```\n*  After Transpile\n```js\nvar A = /*#__PURE__*/function A() {\n  _classCallCheck(this, A);\n};\n\nA.a = 1;\n\nexport default A;\n```\n> ```A.a = 1;``` is not in the ```/*#__PURE__*/``` area. So Tree Shaking does not work as side effect occurs.\n>\n> But the result I want is that ```A.a = 1;``` is also in the ```/*#__PURE__*/``` area.\n> \n> If you use this plugin, it will be Tree shaking without side effect.\n```js\nvar A = /*#__PURE__*/function () {\n  var A = /*#__PURE__*/function A() {\n    _classCallCheck(this, A);\n  }\n  A.a = 1;\n  return A;\n};\n\nexport default A;\n```\n\n\n## Install\n\nUsing npm:\n\n```sh\nnpm install --save-dev babel-plugin-no-side-effect-class-properties\n```\n\n.babelrc\n\n```json\n{\n  \"plugins\": [\n    [\"no-side-effect-class-properties\"],\n    [\"@babel/plugin-proposal-class-properties\", { \"loose\": true }],\n  ]\n}\n\n```\n\n## License\n\n```\nCopyright 2018 NAVER Corp.\n\nPermission is hereby granted, free of charge, to any person obtaining \na copy of this software and associated documentation files (the \n\"Software\"), to deal in the Software without restriction, including \nwithout limitation the rights to use, copy, modify, merge, publish, \ndistribute, sublicense, and/or sell copies of the Software, and to \npermit persons to whom the Software is furnished to do so, subject to \nthe following conditions:\n\nThe above copyright notice and this permission notice shall be \nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, \nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF \nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND \nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE \nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION \nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION \nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n```","readmeFilename":"README.md"}