{"_id":"webpack-strip-block","_rev":"16-6e3c20909a9612c44228be3da8d059b0","name":"webpack-strip-block","time":{"modified":"2022-06-29T00:10:25.122Z","created":"2014-07-12T16:23:59.722Z","0.0.0":"2014-07-12T16:23:59.722Z","0.0.1":"2014-07-12T16:36:59.383Z","0.0.3":"2016-06-18T19:13:05.279Z","0.1.0":"2016-07-16T15:18:13.557Z","0.1.1":"2017-04-21T18:20:39.217Z","0.2.0":"2017-05-05T19:27:38.062Z","0.3.0":"2020-08-21T00:27:57.592Z"},"maintainers":[{"name":"jballant","email":"james@1stdibs.com"}],"dist-tags":{"latest":"0.3.0"},"description":"Webpack plugin to strip blocks of code that's only intended for development purposes","readme":"Webpack Strip Block\n===================\n\nWebpack loader to strip blocks of code marked by special comment tags. Useful for removing code that you don't want in your production webpack bundle (e.g. verbose console warnings, etc).\n\n### Example:\n\nIn your client js source files:\n\n```javascript\n\nvar makeFoo(bar, baz) {\n    // The following code will be stripped with our webpack loader\n    /* develblock:start */\n    if (bar instanceof Bar !== true) {\n        throw new Error('makeFoo: bar param is required and must be instance of Bar');\n    }\n    /* develblock:end */\n\n    // This code would remain\n    return new Foo(bar, baz);\n}\n\n```\n\nIn your webpack config, specify the loader:\n\n```javascript\nmodule.exports = {\n  rules: [\n    {\n      test: /\\.js$/,\n      enforce: 'pre',\n      exclude: /(node_modules|bower_components|\\.spec\\.js)/,\n      use: [\n        {\n          loader: 'webpack-strip-block'\n        }\n      ]\n    }\n  ]\n};\n```\n\nIf you want to use custom comment tags to mark the start and end of the block to strip from your code, you can add options for \"start\" and \"end\" like this:\n\n```javascript\nmodule.exports = {\n  rules: [\n    {\n      test: /\\.js$/,\n      enforce: 'pre',\n      exclude: /(node_modules|bower_components|\\.spec\\.js)/,\n      use: [\n        {\n          loader: 'webpack-strip-block',\n          options: {\n            start: 'DEV-START',\n            end: 'DEV-END'\n          }\n        }\n      ]\n    }\n  ]\n};\n```\n","versions":{"0.0.1":{"name":"webpack-strip-block","version":"0.0.1","description":"Webpack plugin to strip blocks of code that's only intended for development purposes","main":"index.js","repository":{"type":"git","url":"git://git@github.com/jballant/webpack-strip-block.git"},"homepage":"https://github.com/jballant/webpack-strip-block","keywords":["webpack","webpackloader","stripcode"],"author":{"name":"James Ballantine","email":"james@1stdibs.com","url":"http://www.1stdibs.com"},"license":"MIT","bugs":{"url":"https://github.com/jballant/webpack-strip-block/issues"},"_id":"webpack-strip-block@0.0.1","dist":{"shasum":"37fafdffbbcf2606e92b5d6cbf6729ae4c6a1715","tarball":"https://registry.npmjs.org/webpack-strip-block/-/webpack-strip-block-0.0.1.tgz","integrity":"sha512-wmIkMJ2dFgpa6obxUTvwNPsOwiYoacfSGTnDVKGIY2ypZqZ3VMUYjgkdkemvQ1JDEzvuwTHn8dnNqfUye+naLA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBJ1xywxEDud7mghBEYCtjx/Fmz3sWFeMu9/d1Z6sXkbAiEAwL3bDTQgTBCvqTzvSuaVsxebSKxtCk2hRvqr9nLYpak="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"jballant","email":"james@1stdibs.com"},"maintainers":[{"name":"jballant","email":"james@1stdibs.com"}],"directories":{}},"0.0.3":{"name":"webpack-strip-block","version":"0.0.3","description":"Webpack plugin to strip blocks of code that's only intended for development purposes","main":"index.js","repository":{"type":"git","url":"git://git@github.com/jballant/webpack-strip-block.git"},"homepage":"https://github.com/jballant/webpack-strip-block","keywords":["webpack","webpackloader","stripcode"],"author":{"name":"James Ballantine","email":"james@1stdibs.com","url":"http://www.1stdibs.com"},"license":"MIT","gitHead":"a6422fb4a8b32185c72e3e4b53c9359aaab9a0da","bugs":{"url":"https://github.com/jballant/webpack-strip-block/issues"},"_id":"webpack-strip-block@0.0.3","scripts":{},"_shasum":"0c9b235a3b613a1e3461b770bc0d7e0e285dbdb8","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.7.0","_npmUser":{"name":"jballant","email":"jballant@gmail.com"},"dist":{"shasum":"0c9b235a3b613a1e3461b770bc0d7e0e285dbdb8","tarball":"https://registry.npmjs.org/webpack-strip-block/-/webpack-strip-block-0.0.3.tgz","integrity":"sha512-FLK/Z4+m4WVUSqaQ/huyte8Cg9fFr6FwO6aYxbkkJC+EXYanSMj6cg2irRI7fLR4j4XCc6kL/HjYtxmK8/9qcg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCWlE+84VryCI2NemZpXIEAW6iRwjP7TlB6h83kNQ57awIgSubQ43ATI7d4HD4VTUFZYkFwW+eAtV4NML1S97Jv0gg="}]},"maintainers":[{"name":"jballant","email":"james@1stdibs.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/webpack-strip-block-0.0.3.tgz_1466277184072_0.6321475117001683"},"directories":{}},"0.1.0":{"name":"webpack-strip-block","version":"0.1.0","description":"Webpack plugin to strip blocks of code that's only intended for development purposes","main":"index.js","repository":{"type":"git","url":"git://git@github.com/jballant/webpack-strip-block.git"},"homepage":"https://github.com/jballant/webpack-strip-block","keywords":["webpack","webpackloader","stripcode"],"author":{"name":"James Ballantine","email":"james@1stdibs.com","url":"http://www.1stdibs.com"},"contributors":[{"name":"Alexander Wunschik","email":"mail@wunschik.it","url":"http://www.wunschik.it"}],"license":"MIT","gitHead":"f4955569fa0cf41805419351d7f62e6cc228132d","bugs":{"url":"https://github.com/jballant/webpack-strip-block/issues"},"_id":"webpack-strip-block@0.1.0","scripts":{},"_shasum":"bed2d60bc852a38a51076354d771002a3ac06f6e","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.7.0","_npmUser":{"name":"jballant","email":"jballant@gmail.com"},"dist":{"shasum":"bed2d60bc852a38a51076354d771002a3ac06f6e","tarball":"https://registry.npmjs.org/webpack-strip-block/-/webpack-strip-block-0.1.0.tgz","integrity":"sha512-MRVitLwaayVZ6tITFtV7iW3hpuDpsogmJZ+9fegd5XYwdWcWTZ7wPRBSBpkYGHTw3v8pMZuCqGbOpp5dcQtLwA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDNMvQWNvBzYEv+Ow0B3uh1xkmH3DjCIJpw2wZSbgMs3AiEAiaEeynMerJn8e4aMnevpY4Lu5Kr/3eQkwxOc7dwoqO8="}]},"maintainers":[{"name":"jballant","email":"james@1stdibs.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/webpack-strip-block-0.1.0.tgz_1468682291358_0.20426962454803288"},"directories":{}},"0.1.1":{"name":"webpack-strip-block","version":"0.1.1","description":"Webpack plugin to strip blocks of code that's only intended for development purposes","main":"index.js","repository":{"type":"git","url":"git://git@github.com/jballant/webpack-strip-block.git"},"homepage":"https://github.com/jballant/webpack-strip-block","keywords":["webpack","webpackloader","stripcode"],"author":{"name":"James Ballantine","email":"james@1stdibs.com","url":"http://www.1stdibs.com"},"contributors":[{"name":"Alexander Wunschik","email":"mail@wunschik.it","url":"http://www.wunschik.it"}],"license":"MIT","gitHead":"d983f166c8e24c22ac01a1254c2c20de6a8e2b62","bugs":{"url":"https://github.com/jballant/webpack-strip-block/issues"},"_id":"webpack-strip-block@0.1.1","scripts":{},"_shasum":"f036d47efc2505864ee5c8a2d1440704c89a403b","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.2","_npmUser":{"name":"jballant","email":"jballant@gmail.com"},"dist":{"shasum":"f036d47efc2505864ee5c8a2d1440704c89a403b","tarball":"https://registry.npmjs.org/webpack-strip-block/-/webpack-strip-block-0.1.1.tgz","integrity":"sha512-dwqvQ6i39di6i1VEKWpSg2IteK9KrP7RTrTOELRaS7X4c51ik6rBZZCrgkkRfkwenC2aqsMtIxhS7NIGCZuMvg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDBVe0jwmhe8J0Qy1Bu5Vk0AIMT3sRWJJY3uipA7pgaowIhAKFBvgyITFrw6wTArSDat4gA17pYRn+La6zVM+YsdcQ0"}]},"maintainers":[{"name":"jballant","email":"james@1stdibs.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/webpack-strip-block-0.1.1.tgz_1492798837324_0.8251742850989103"},"directories":{}},"0.2.0":{"name":"webpack-strip-block","version":"0.2.0","description":"Webpack plugin to strip blocks of code that's only intended for development purposes","main":"index.js","repository":{"type":"git","url":"git://git@github.com/jballant/webpack-strip-block.git"},"homepage":"https://github.com/jballant/webpack-strip-block","keywords":["webpack","webpackloader","stripcode"],"author":{"name":"James Ballantine","email":"james@1stdibs.com","url":"http://www.1stdibs.com"},"contributors":[{"name":"Alexander Wunschik","email":"mail@wunschik.it","url":"http://www.wunschik.it"}],"license":"MIT","peerDependencies":{"webpack":">=2.2.0"},"dependencies":{"loader-utils":"^1.1.0"},"gitHead":"89fed28264a639fdbc8b5eb831f48c7821020944","bugs":{"url":"https://github.com/jballant/webpack-strip-block/issues"},"_id":"webpack-strip-block@0.2.0","scripts":{},"_shasum":"c60d4a703e0eeee8895e7f1abe9b5fe914681470","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.2","_npmUser":{"name":"jballant","email":"jballant@gmail.com"},"dist":{"shasum":"c60d4a703e0eeee8895e7f1abe9b5fe914681470","tarball":"https://registry.npmjs.org/webpack-strip-block/-/webpack-strip-block-0.2.0.tgz","integrity":"sha512-SX0Qir0bJ94gyqyqAjoH1h72sHngq2onR8pA1ldWNNisaU+QCMJBvK2K//zfStUHcqqkWYYoyMAqiPAj0CXm1g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFntLshhrUlaYXAmp68NOdbeNX6E0HpClhJd+ejxQfn1AiAbO4NpBh/sjJ82+rHiUV2mTIplu4F57MalRKLv9tIMpw=="}]},"maintainers":[{"name":"jballant","email":"james@1stdibs.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/webpack-strip-block-0.2.0.tgz_1494012456124_0.8047654451802373"},"directories":{}},"0.3.0":{"name":"webpack-strip-block","version":"0.3.0","description":"Webpack plugin to strip blocks of code that's only intended for development purposes","main":"index.js","repository":{"type":"git","url":"git://git@github.com/jballant/webpack-strip-block.git"},"homepage":"https://github.com/jballant/webpack-strip-block","keywords":["webpack","webpackloader","stripcode"],"author":{"name":"James Ballantine","email":"james@1stdibs.com","url":"http://github.com/jballant"},"contributors":[{"name":"Alexander Wunschik","email":"mail@wunschik.it","url":"http://www.wunschik.it"}],"license":"MIT","peerDependencies":{"webpack":">=2.2.0"},"dependencies":{"loader-utils":"^1.1.0"},"devDependencies":{"memfs":"^3.1.2","memory-fs":"^0.5.0","mocha":"^7.1.1","webpack":"^4.42.1"},"scripts":{"test":"mocha"},"gitHead":"1422d4310ec06b5c0dcc31bed13df8be0648085a","bugs":{"url":"https://github.com/jballant/webpack-strip-block/issues"},"_id":"webpack-strip-block@0.3.0","_nodeVersion":"12.3.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-rXN+SI6S7tzUr1Jvhq3Rcl2bGfpY5ZC9XSRm2rH68eYkDheCczEs61iir1A00iv1Nt8FY1J6BDRgXKtil+fk+g==","shasum":"e864c8d71fade02c55332f7fb34f7970ba5076c8","tarball":"https://registry.npmjs.org/webpack-strip-block/-/webpack-strip-block-0.3.0.tgz","fileCount":12,"unpackedSize":16324,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPxUNCRA9TVsSAnZWagAAnHYP/3jQNqMT5H6yuyN9vEDV\n2rxCT4QzW/sHywrQFH7TPAyA6dsW6dwNV5qxuAp1+GWmiLFSVUaMQZoXTENu\nWg4euWExwmOxDUqnYDyS8wEJDv5DFf7YP4d69cA9avSi62EytzR5syZrIhw1\nbls2ZafgT/Ywwo+MRGYRCflZI2N7i2cQXzrNS4JzSZtUZciopyFWWv3VI/Jf\nhuV9cPcEUSaE+qBXV59MboNvZIgNCu/XyqijtfVDm+fWNk7SDeCc9H3vs7PM\nGp7ZZgELNzw5bwf8zw0wkA0M2iLCxr0Fkwck/1v9gN9IG0/S02IGA2i1nN8c\n+EsS4qdO7vVAXEd3DPETnAvX+glCzZPZNyPgVNkHPicwaglwBj5iAt23/3HP\nfSk6J84sr1yFvl71x6gXfGgZZagCUjNnP7HT3gxj2gaTr/qDo9LXkVOCmgUJ\nAgWjM2eRbUZ2bZctznRdXPBEwh2gTnFWGBCRzhoU5Srgm/8NqqBrCy6ADwaS\ndGudjGxfrpJxdvAKUl9BNxhYpkyXP2+62N6udJyfkI6neIbMa5TmIx34r87J\naoH1DKl+oFYGYDxPc/OHJaHnJ9dJm+OBToIezFovhgWITVbFKbxh2xHagcrp\n+lkJA0VgruzMDl4UBJ/7zivGyZPUW220hiDr0CQtg4bpTFOfNGu+AM7wDjcg\nrizs\r\n=8HB+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBvfmUMnUrHvlB7TIdCENznqXkF9yfpR7rVA0PmFC9j9AiEA7k0NxwRcLvNv4fcdltRxKae7Gzgc8d1OCehzJ7JB2Uc="}]},"maintainers":[{"name":"jballant","email":"james@1stdibs.com"}],"_npmUser":{"name":"jballant","email":"jballant@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/webpack-strip-block_0.3.0_1597969677397_0.2417564404270467"},"_hasShrinkwrap":false}},"homepage":"https://github.com/jballant/webpack-strip-block","keywords":["webpack","webpackloader","stripcode"],"repository":{"type":"git","url":"git://git@github.com/jballant/webpack-strip-block.git"},"author":{"name":"James Ballantine","email":"james@1stdibs.com","url":"http://github.com/jballant"},"bugs":{"url":"https://github.com/jballant/webpack-strip-block/issues"},"license":"MIT","readmeFilename":"README.md","contributors":[{"name":"Alexander Wunschik","email":"mail@wunschik.it","url":"http://www.wunschik.it"}],"users":{"noderat":true}}