{"_id":"config-webpack","_rev":"6-8eb35af5e931f94d31288114c7a6a67b","name":"config-webpack","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.0":{"name":"config-webpack","version":"1.0.0","description":"Plugin that makes node-config work with Webpack","main":"index.js","scripts":{"build":"babel -d dist src","test":"mocha --require babel-register","pretest":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/arthanzel/node-config-webpack.git"},"keywords":["config","node-config","webpack","plugin"],"author":{"name":"Martin Hanzel","email":"arthanzel@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/arthanzel/node-config-webpack/issues"},"homepage":"https://github.com/arthanzel/node-config-webpack#readme","devDependencies":{"babel-cli":"^6.26.0","babel-preset-env":"^1.6.1","babel-register":"^6.26.0","chai":"^4.1.2","config":"^1.30.0","mocha":"^5.0.2","webpack":"^4.1.1"},"peerDependencies":{"config":"^1.30.0","webpack":"^1.0.0 || ^2.0.0 || ^3.0.0 || ^4.0.0"},"gitHead":"b767d3697bff05841243590ba5ec3ae922f627dc","_id":"config-webpack@1.0.0","_npmVersion":"5.6.0","_nodeVersion":"9.8.0","_npmUser":{"name":"arthanzel","email":"arthanzel@gmail.com"},"dist":{"integrity":"sha512-xb023dbnykJnzINVvIiPC1s6FMhfeItf0lROEuFSV4IYzj19z9gl7Vr5LiPH9yMPesm0S7M/aX7kchW7DqnL/A==","shasum":"35c18f9af6ba98f32773f00a1c3ee309f300025e","tarball":"https://registry.npmjs.org/config-webpack/-/config-webpack-1.0.0.tgz","fileCount":12,"unpackedSize":354507,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE18MPTMGOGsOU/Cl5qar4ByqClurYoio1RSv6KhZDUCAiEAss7i2f/yuhNDKT87MKdvC3CMdMfUenM3HJol6k3xZkE="}]},"maintainers":[{"name":"arthanzel","email":"arthanzel@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/config-webpack_1.0.0_1520539998888_0.733968322823658"},"_hasShrinkwrap":false},"1.0.1":{"name":"config-webpack","version":"1.0.1","description":"Plugin that makes node-config work with Webpack","main":"index.js","scripts":{"build":"babel -d dist src","test":"mocha --require babel-register","pretest":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/arthanzel/node-config-webpack.git"},"keywords":["config","node-config","webpack","plugin"],"author":{"name":"Martin Hanzel","email":"arthanzel@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/arthanzel/node-config-webpack/issues"},"homepage":"https://github.com/arthanzel/node-config-webpack#readme","devDependencies":{"babel-cli":"^6.26.0","babel-preset-env":"^1.6.1","babel-register":"^6.26.0","chai":"^4.1.2","config":"^1.30.0","mocha":"^5.0.2","webpack":"^4.1.1"},"peerDependencies":{"config":"^1.30.0","webpack":"^1.0.0 || ^2.0.0 || ^3.0.0 || ^4.0.0"},"gitHead":"b63171eacdfd9505071c1ba50eacd9bf99e0f3ae","_id":"config-webpack@1.0.1","_npmVersion":"5.6.0","_nodeVersion":"9.8.0","_npmUser":{"name":"arthanzel","email":"arthanzel@gmail.com"},"dist":{"integrity":"sha512-aJJbUT1SUBPwAf38y2GNmT0M/PxkZWfE9x35d3jQJxxCuEb3PhswMRv5k60lWvdYrv1vWE88DRC+ZvYIQIcNWw==","shasum":"42ccd0e402134a378477d081afac66945eb3c775","tarball":"https://registry.npmjs.org/config-webpack/-/config-webpack-1.0.1.tgz","fileCount":12,"unpackedSize":357298,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDrdeYnLGpiG0hRPOLCIoTKM3ZD9NH0t4mATWHCEBMjNwIhAN+sGOpJQqsvi0ZubGUPq6uhxUhk/5XiCx3fbwfs4+BZ"}]},"maintainers":[{"name":"arthanzel","email":"arthanzel@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/config-webpack_1.0.1_1520540561045_0.8351549069334461"},"_hasShrinkwrap":false},"1.0.3":{"name":"config-webpack","version":"1.0.3","description":"Plugin that makes node-config work with Webpack","main":"index.js","scripts":{"build":"babel -d dist src","test":"mocha --require babel-register","test3":"npm install webpack@3.x && npm run test","test4":"npm install webpack@4.x && npm run test","pretest":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/arthanzel/node-config-webpack.git"},"keywords":["config","node-config","webpack","plugin"],"author":{"name":"Martin Hanzel","email":"arthanzel@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/arthanzel/node-config-webpack/issues"},"homepage":"https://github.com/arthanzel/node-config-webpack#readme","devDependencies":{"babel-cli":"^6.26.0","babel-preset-env":"^1.6.1","babel-register":"^6.26.0","chai":"^4.1.2","config":"^1.30.0","mocha":"^5.0.2","webpack":"^4.1.1"},"peerDependencies":{"config":"^1.30.0","webpack":"^1.0.0 || ^2.0.0 || ^3.0.0 || ^4.0.0"},"gitHead":"a4f8b4b9e0650e6318187153fc11e5640971d187","_id":"config-webpack@1.0.3","_npmVersion":"5.6.0","_nodeVersion":"9.8.0","_npmUser":{"name":"arthanzel","email":"arthanzel@gmail.com"},"dist":{"integrity":"sha512-DW5ZgZZjkvKye7gdQX8QR0tVNE7P8QOU5xSruAdshgeMK5tOnM+Mzis7bImWnYUxXeNoNiAjJB+09H5fUI1/6w==","shasum":"8af631fa15655ce5d79e2e06f6bd38a3c19638f4","tarball":"https://registry.npmjs.org/config-webpack/-/config-webpack-1.0.3.tgz","fileCount":11,"unpackedSize":12971,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDV7fjrtFHjo0gyJsmftyde4j/KzmQOayGiyVoITrVrxAIgSz7ajfUMEOd6GLeldf2tmqCHWK9if/QZHDwXnLRGF50="}]},"maintainers":[{"name":"arthanzel","email":"arthanzel@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/config-webpack_1.0.3_1520541400840_0.8324090705263691"},"_hasShrinkwrap":false},"1.0.4":{"name":"config-webpack","version":"1.0.4","description":"Plugin that makes node-config work with Webpack","main":"index.js","scripts":{"build":"babel -d dist src","test":"mocha --require babel-register","test3":"npm install webpack@3.x && npm run test","test4":"npm install webpack@4.x && npm run test","pretest":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/arthanzel/node-config-webpack.git"},"keywords":["config","node-config","webpack","plugin"],"author":{"name":"Martin Hanzel","email":"arthanzel@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/arthanzel/node-config-webpack/issues"},"homepage":"https://github.com/arthanzel/node-config-webpack#readme","devDependencies":{"babel-cli":"^6.26.0","babel-preset-env":"^1.6.1","babel-register":"^6.26.0","chai":"^4.1.2","config":"^1.30.0","mocha":"^5.0.2","webpack":"^4.1.1"},"peerDependencies":{"config":"^1.30.0","webpack":"^1.0.0 || ^2.0.0 || ^3.0.0 || ^4.0.0"},"gitHead":"a776c6484e1c253eca732f8c6563bea6df1af384","_id":"config-webpack@1.0.4","_npmVersion":"5.6.0","_nodeVersion":"9.8.0","_npmUser":{"name":"arthanzel","email":"arthanzel@gmail.com"},"dist":{"integrity":"sha512-7Eb3HfaS855sW01JUwldttWflh3UejJn/ZRfDPCSyv4p/ao8eHyGrfIR5Lyerbl5CHTEEKIRwArXPXJHIQ2X3g==","shasum":"4768875d7394c799a135f9b6673be17e5ec04a1f","tarball":"https://registry.npmjs.org/config-webpack/-/config-webpack-1.0.4.tgz","fileCount":15,"unpackedSize":19071,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA7VAJhX8mikR7A0EkiNum8pemRdFw7Egoj6cgdFSZWiAiEA3tpyC5fh1Ewo5jr/Umag/ZBWw3rZWBnYrRko9QfrABY="}]},"maintainers":[{"name":"arthanzel","email":"arthanzel@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/config-webpack_1.0.4_1520544978550_0.678411551465641"},"_hasShrinkwrap":false},"1.0.5":{"name":"config-webpack","version":"1.0.5","description":"Plugin that makes node-config work with Webpack","main":"index.js","scripts":{"build":"babel -d dist src","test":"mocha --require babel-register","test3":"npm install webpack@3.x && npm run test","test4":"npm install webpack@4.x && npm run test","pretest":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/arthanzel/node-config-webpack.git"},"keywords":["config","node-config","webpack","plugin"],"author":{"name":"Martin Hanzel","email":"arthanzel@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/arthanzel/node-config-webpack/issues"},"homepage":"https://github.com/arthanzel/node-config-webpack#readme","devDependencies":{"babel-cli":"^6.26.0","babel-preset-env":"^1.6.1","babel-register":"^6.26.0","chai":"^4.1.2","config":"^1.30.0","mocha":"^5.0.2","webpack":"^4.46.0"},"peerDependencies":{"config":"^1.30.0 || ^2.0.0 || ^3.0.0","webpack":"^1.0.0 || ^2.0.0 || ^3.0.0 || ^4.0.0"},"gitHead":"7c97cd20bb2cb4f02c4bb8474d8cbf4c2fc6ecfa","_id":"config-webpack@1.0.5","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-ytSIkCQSUPARZh3SpKYLAhE0+2+i2+Gz9t9K/jooGzbVQeDGAZzAAphPpqyvXAcrXHndu5nUnY0ZduK07TvXmA==","shasum":"bccb13ab87ca9d1ab300b128fc0092f1294b39a8","tarball":"https://registry.npmjs.org/config-webpack/-/config-webpack-1.0.5.tgz","fileCount":15,"unpackedSize":19237,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQl37CRA9TVsSAnZWagAADQIP+wUjYLZmz9uZIwBfFyEx\np8i8Vk9OSblvtSk7aDEmd2aANaqPc0wvUEt/W2xuGEdrlobX2ViBtHvF/m1S\nv/mqgFEHtXxC9lBsa5RLJP2BewIMem3994i5MSEBIg2YssMl1TO4dTEio9+c\nK2RqW9UU/0ZQ4/O80MB1PKIraKuCmQV0T2x2fEbq78Q8Qy3mUL0llIhqe7ra\n6CPqw7fY25h31Kfy1EW0yVNW/3QgROT5mVR71bpjA0oJO3xktp0NNmi0izaH\nl7keSI6VZf39kkYTI5Pc7BQ81nH51wdqASNKTl6kXA7chiE967QglKUVrWuU\nvga0R9Wh4/GC1TLZTl1jZOHIVnXaVRZ3oc0cWTDdlPL7+EfCw4OCRbm+xMCR\nROAI1kourx7vED+FS3JU7W0iyV9/Ov+tJmR54PS0405W9Olr89aXGadT4L9m\nVzbwXpdpYT4VXMID7cceAWrR8sZziB2Fhz5DUmNHd2rOFnK3jxS0uUBgcFCE\nF9JQCyThifLy8nPg+rTT6cu2tCan9oVMvbEu99bbmhcWywCquNNAWCFe22u9\n3B+2g1OGHQs7BO8sx0YoLezQB/T8fMuo96mxplZg9Kz9QdcAgnqRaN39qRbQ\nXw37BppISkVjgYofISAhgHJMiziaadK04pzr7+fMNDF/qxY2JIhnWCs06oEU\ntKZF\r\n=bIHX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDBah1HnzLIsmXO56wX/F71RdEM/up2fjSKn3ryj42M5AIhALx6fzEiZmmibMnz9sWc0JrQ3TE4IuVTSHgP+7bCSiTI"}]},"_npmUser":{"name":"arthanzel","email":"arthanzel@gmail.com"},"directories":{},"maintainers":[{"name":"arthanzel","email":"arthanzel@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/config-webpack_1.0.5_1614962170920_0.2732682022049848"},"_hasShrinkwrap":false}},"time":{"created":"2018-03-08T20:13:18.888Z","1.0.0":"2018-03-08T20:13:19.001Z","modified":"2022-04-27T15:34:31.376Z","1.0.1":"2018-03-08T20:22:41.151Z","1.0.3":"2018-03-08T20:36:40.901Z","1.0.4":"2018-03-08T21:36:18.610Z","1.0.5":"2021-03-05T16:36:11.131Z"},"maintainers":[{"name":"arthanzel","email":"arthanzel@gmail.com"}],"description":"Plugin that makes node-config work with Webpack","homepage":"https://github.com/arthanzel/node-config-webpack#readme","keywords":["config","node-config","webpack","plugin"],"repository":{"type":"git","url":"git+https://github.com/arthanzel/node-config-webpack.git"},"author":{"name":"Martin Hanzel","email":"arthanzel@gmail.com"},"bugs":{"url":"https://github.com/arthanzel/node-config-webpack/issues"},"license":"MIT","readme":"Node Config Webpack Plugin\n==========================\n\nMake [node-config](https://github.com/lorenwest/node-config) work with [Webpack](https://webpack.js.org/)!\n\n[![Build Status](https://travis-ci.org/arthanzel/node-config-webpack.svg?branch=master)](https://travis-ci.org/arthanzel/node-config-webpack)\n\n\nIntroduction\n------------\nMake [node-config](https://github.com/lorenwest/node-config) work with [Webpack](https://webpack.js.org/)!\n\n[Node-config](https://github.com/lorenwest/node-config) takes a bunch of config files and makes them available to your application as a plain ol' Javascript object. This doesn't work with Webpack because the config files need to be read on the server.\n\nSo what if you need to configure a client application? Or multiple deployments of a client application? What if you need to point your single-page app to `localhost` when you're developing, but automatically make it point to `https://my-production-server.com` in prod?\n\nYou use `config-webpack`, that's what you do.\n\nUsage\n-----\n    $ npm install config-webpack\n    \nAdd the `ConfigWebpack` plugin to your `webpack.config.js`.\n\n```javascript\nconst ConfigWebpackPlugin = require(\"config-webpack\");\n\n// some Webpack config\n\nplugins: [\n    new ConfigWebpackPlugin()\n]\n```\n   \nRefer to your configs in your bundled Javascript via the `CONFIG` global.\n\n```javascript\nif (CONFIG.amIAWalrus) {\n    console.log(CONFIG.iAmAWalrus);\n}\n```\n    \nObjects and arrays work transparently.\n\n```javascript\nconsole.log(CONFIG.walruses[3].name);\n```\n\n`config-webpack` uses Webpack's [DefinePlugin](https://webpack.js.org/plugins/define-plugin/) mechanism to perform direct replacement of keys in your JS files with config values. This means that, if your config looks like `{ \"numberOfTusks\": 2 }`, then every instance of `CONFIG.numberOfTusks` in your code will be directly replaced with the literal `2`.\n\nAll of `node-config`'s features, including deployment- and instance-specific files, local files, and environment variables should work with `node-config-webpack`. `node-config-webpack` bundles your config on the machine that builds it. That means if you bundle on a development machine and deploy on a production machine, you'll get the development config.\n\n`config-webpack` is tested with Webpack versions `3.x` and `4.x`.\n\nConfiguring\n-----------\nSpecify a custom namespace instead of `CONFIG`:\n\n```javascript\n// webpack.config.js\nnew ConfigWebpackPlugin(\"myConfig\")\n\n// app.js\nconsole.log(myConfig.numberOfTusks);\n```\n    \nSpecify a custom object instead of the one `node-config` generates.\n\n    new ConfigWebpackPlugin(\"myConfig\", { numberOfTusks: 3, colorOfTusks: \"yellow\" })\n    \nSecurity\n--------\n`node-config-webpack` will only inject config values that are used in your application. If a config value isn't referenced anywhere, it won't appear in your bundled sources.\n\nBe careful when referring to any top-level objects, though:\n\n```javascript\nif (CONFIG.debug) {\n    console.log(CONFIG);\n}\n```\n    \nThis will expose your *entire* config object, *even if debug is false*.\n\nImmutability\n------------\nSince Webpack performs direct replacement on your code, the config is immutable. Trying to mutate or assign to the config will result in an exception.\n","readmeFilename":"README.md"}