{"_id":"@automattic/webpack-inline-constant-exports-plugin","_rev":"161-8f5e0fb4b28b44f14960b5b1325d731b","name":"@automattic/webpack-inline-constant-exports-plugin","dist-tags":{"latest":"1.0.0"},"versions":{"0.0.1":{"name":"@automattic/webpack-inline-constant-exports-plugin","version":"0.0.1","keywords":["Webpack"],"license":"GPL-2.0-or-later","_id":"@automattic/webpack-inline-constant-exports-plugin@0.0.1","maintainers":[{"name":"sgomes","email":"mail@sgomes.io"},{"name":"hanifn","email":"hanif@automattic.com"},{"name":"dchymko","email":"dchymko@Infometrix.ca"},{"name":"jeherve","email":"jeremy@tagada.hu"},{"name":"enej","email":"enej.bajgoric@automattic.com"},{"name":"jsnajdr","email":"jsnajdr@gmail.com"},{"name":"beaucollins","email":"beaucollins@gmail.com"},{"name":"blowery","email":"ben@blowery.org"},{"name":"tug","email":"dekervit@gmail.com"},{"name":"elazzabi","email":"elazzabi.ahmed@gmail.com"},{"name":"quasistar","email":"gabriel.sambarino@automattic.com"},{"name":"mjangda","email":"batmoo@gmail.com"},{"name":"undemian","email":"undemian@gmail.com"},{"name":"a8c","email":"vip@matticspace.com"},{"name":"ockham","email":"ockham@raz.or.at"},{"name":"sirreal","email":"jon.surrell@gmail.com"},{"name":"gwwar","email":"kerryliu@gmail.com"},{"name":"vindl","email":"markoandrijasevic@gmail.com"},{"name":"rodrigoia8c","email":"rodrigo.iloro@automattic.com"},{"name":"joshbetz","email":"j@joshbetz.com"},{"name":"nickdaugherty","email":"ndaugherty987@gmail.com"}],"homepage":"https://github.com/Automattic/wp-calypso/tree/master/packages/webpack-inline-constant-exports-plugin","bugs":{"url":"https://github.com/Automattic/wp-calypso/issues"},"dist":{"shasum":"a6e3625ed5e2d3c5ef26ee1da9914fcdeda1e470","tarball":"https://registry.npmjs.org/@automattic/webpack-inline-constant-exports-plugin/-/webpack-inline-constant-exports-plugin-0.0.1.tgz","fileCount":13,"integrity":"sha512-GblKlip1VR5Hj0pg6FtKRgEzOyY1hj6DgwsSB9cSvLikyEWBbxH8o1AGGVWYtQcZEqmoxnw4Lq6NeswuxA4N7w==","signatures":[{"sig":"MEUCIB4G0GM86gaLfdhCuXy8jikP8RdS0LhsRcrJMi7y2wkhAiEAmtQqf6dY1A0MphPw19Q84HYxAfkg6erHBe6crdB6QYw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":30580,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc9QsHCRA9TVsSAnZWagAALTkP+wdkQZkvhWt2ImXZifRn\nfi8sn+HFB22+MLoFcIL1pUQ6lZy0ixrcT12/AP6OK52tlO7siBcYjNjwoisy\nbUtdYQqThiQL8H7xeFCamx0JuusG3BzMiP6dltnT4ZJnNN6WhsZUm1KXmxEJ\n1gFFEyFbpT15cK1SyxGN1vAQzwev98wHelsXjQgV8vMlRLzUw6vaTw5D9NCy\nq0vZeS3PU2Sx0sZXz3TdhSQ8tjbz6Bd9/gdwTPXv6LJosCaLl0PdoXd/ctsu\nmGIdTgf3J58vGwGHhiAM9AwEY/vK/jX4cjfE//y0PvxIIEel5ukxOf1P6frD\nSaHC3XDqpmsH/re9pv2bxf/8qZqGlcrIR3p90VyUQ/XbS9Ag1OGXECi1vm9u\nz/53slGx2gipMbvuiE8quOQKNTmO+TdMFjidTwXjBWvxUYVPSZkrOPRuMJD/\nR5ur2xUp/MIGInouGTq370n9f6XtmIJG/VVa94jFyZOP+8jPCOji1NABKQXR\nieMl5nnAjfRnmSn7YAOoQI30ET8DkjXlQB4VKIC4u5bcA5cZklk2zSk644iT\n6+o+7W1YS4Xh3UMF/DyiOjY/vqkULlv5v3HeAVG9qYSEuVXn6gXd2a78FgC1\nOZceQRORlQY0g3snmJnK8GY+kTj9Q/LBS/+VM+O7ho0jR9UoaLTJHuPLSMNV\njj/g\r\n=5aWU\r\n-----END PGP SIGNATURE-----\r\n"},"gitHead":"f7d06c6d5904a74e60654338dffb8de6f1223134","scripts":{},"_npmUser":{"name":"sirreal","email":"jon.surrell@gmail.com"},"repository":{"url":"git+https://github.com/Automattic/wp-calypso.git","type":"git","directory":"packages/webpack-inline-constant-exports-plugin"},"_npmVersion":"lerna/3.14.1/node@v10.15.2+x64 (darwin)","description":"Webpack plugin to inline constant exports from modules","directories":{},"_nodeVersion":"10.15.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"webpack":"^4.29.6"},"_npmOperationalInternal":{"tmp":"tmp/webpack-inline-constant-exports-plugin_0.0.1_1559563015286_0.04741982375955822","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"@automattic/webpack-inline-constant-exports-plugin","version":"1.0.0","keywords":["webpack"],"author":{"name":"Automattic Inc."},"license":"GPL-2.0-or-later","_id":"@automattic/webpack-inline-constant-exports-plugin@1.0.0","maintainers":[{"name":"parkcityj","email":"jaye.simons@automattic.com"},{"name":"robertf4","email":"robert.franklin@automattic.com"},{"name":"garypendergast","email":"gary@pento.net"},{"name":"david.szabo97","email":"david.szabo97@gmail.com"},{"name":"cpapazoglou","email":"hrrsppzgl@gmail.com"},{"name":"jakeom","email":"jake.morrison@automattic.com"},{"name":"saroshaga","email":"sarosh.aga@automattic.com"},{"name":"mppfeiffer","email":"npmjscom@frontend-development.de"},{"name":"marekhrabe","email":"marekhrabe@me.com"},{"name":"getdave","email":"getdavemail@gmail.com"},{"name":"netsuso","email":"npm@mail.suso.eu"},{"name":"sarayourfriend","email":"sarayourfriend@fastmail.com"},{"name":"rrinat","email":"npm@rinat.dev"},{"name":"markowsiak","email":"mark.owsiak@gmail.com"},{"name":"enzoru","email":"v@artetecha.com"},{"name":"wunderbart","email":"bartlomiej.kalisz@gmail.com"},{"name":"copons","email":"copons84@hotmail.com"},{"name":"hewsut","email":"hew@automattic.com"},{"name":"yuliyan","email":"yuliyan.slavchev@gmail.com"},{"name":"scinos","email":"sergio.cinos@gmail.com"},{"name":"pandah3","email":"joanne.lee0099@gmail.com"},{"name":"jblz","email":"jeffreykbowen@gmail.com"},{"name":"jeffikus","email":"jeffikus@gmail.com"},{"name":"bms","email":"brandon.m.skinner@gmail.com"},{"name":"chaosexanima","email":"me@echonyc.name"},{"name":"tyxla","email":"tyxla@abv.bg"},{"name":"porada","email":"dominik@porada.co"},{"name":"sgomes","email":"mail@sgomes.io"},{"name":"hanifn","email":"hanif@automattic.com"},{"name":"dchymko","email":"dchymko@Infometrix.ca"},{"name":"jeherve","email":"jeremy@tagada.hu"},{"name":"enej","email":"enej.bajgoric@automattic.com"},{"name":"jsnajdr","email":"jsnajdr@gmail.com"},{"name":"blowery","email":"ben@blowery.org"},{"name":"tug","email":"dekervit@gmail.com"},{"name":"elazzabi","email":"elazzabi.ahmed@gmail.com"},{"name":"quasistar","email":"gabriel.sambarino@automattic.com"},{"name":"mjangda","email":"batmoo@gmail.com"},{"name":"undemian","email":"undemian@gmail.com"},{"name":"a8c","email":"vip@matticspace.com"},{"name":"ockham","email":"ockham@raz.or.at"},{"name":"sirreal","email":"jon.surrell@gmail.com"},{"name":"gwwar","email":"kerryliu@gmail.com"},{"name":"vindl","email":"markoandrijasevic@gmail.com"},{"name":"rodrigoia8c","email":"rodrigo.iloro@automattic.com"},{"name":"joshbetz","email":"j@joshbetz.com"},{"name":"nickdaugherty","email":"ndaugherty987@gmail.com"}],"homepage":"https://github.com/Automattic/wp-calypso/tree/HEAD/packages/webpack-inline-constant-exports-plugin","bugs":{"url":"https://github.com/Automattic/wp-calypso/issues"},"dist":{"shasum":"402fdf6fa8fa047ab6155f92f9558b72e883d1a0","tarball":"https://registry.npmjs.org/@automattic/webpack-inline-constant-exports-plugin/-/webpack-inline-constant-exports-plugin-1.0.0.tgz","fileCount":4,"integrity":"sha512-gbGYpRToZY5kqgWHqQxtNBIkytBODOB+n/mjWu5FxK2rhrJSRFX8JT4mDtaMJM2uhiH+qRLzeBizNEzrZ5S/Vw==","signatures":[{"sig":"MEUCIEL7p6E3OiTTXvzOMx0DjY4XFKLeERXXl9EfEhDLF0kYAiEAvnuyzfHuh2JRuj1+HFfNtE0gjsgvyttRx2puqGknl5A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12276,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf02kkCRA9TVsSAnZWagAAB4UP/R7Rfbw5szZL6nr7v/s7\nWgSCgt0EOMVSzZ5ukAukd1eYtnPBGWi9OeuxLuHfGKcG61mAyQbfm+uw+zO6\nwdDBHNwsk4Q39zCNQ1Cg52gmwcIyd78s7q/4+Q24sH8hSbX3boEhfI8V7hnD\ns30clLggdRPYRahbP3uS2iEHFnwpLwmeRB52Q1RybgCNmwSX0iTQjVGF/rXA\nr3drse6++J8Mx/1Rbs3juS6bqH4fBt56ZYVNeAXnPEmlHtRV/ot7VF0E9rPF\nhpS1l35SzOsXe8FCCGauNL2sv5bkDEQ3JpQnjSnfPZ28A3iqwS2TNYr31pmP\n38Gu5nO9zKzRK3d3rq+5B2bzwJIOvLWD83P8f42/Kr5JV9feY3Zz6U7XO4BE\nF1m9HQI9zTFL2la2hKRXrDw3yI73zFc0LW8x8bqj/QNqOXmHYQb/ZcfZIy4U\nnCOXqg8+FE6/hCrryJp8S+2eY/lR1Iyx2ZqCDeFQhd6wOW5N4Zyg0C5k4ZDx\nDiwkFmkqEuq72FReTrzmvXCtyukn6dU9DHvjYwh/fhAgKsVyZFJJMSILNj/S\n1nZajw+kMIr/V96GpKpMcdDsK0QgREm+UKXBALJNwV54biDMhFRjc0ulw/Os\nRjx9ExT3rM24Rx7fXtCwauhCDXZduKR4wsv97FvhMYfDelT0t+IxijociAud\nkvE2\r\n=dkAN\r\n-----END PGP SIGNATURE-----\r\n"},"scripts":{},"_npmUser":{"name":"scinos","email":"sergio.cinos@gmail.com"},"repository":{"url":"git+https://github.com/Automattic/wp-calypso.git","type":"git","directory":"packages/webpack-inline-constant-exports-plugin"},"_npmVersion":"6.14.8","description":"Webpack plugin to inline constant exports from modules","directories":{},"_nodeVersion":"12.19.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^3.0.0","webpack":"^5.7.0"},"peerDependencies":{"webpack":"^5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/webpack-inline-constant-exports-plugin_1.0.0_1607690532545_0.8639319680645756","host":"s3://npm-registry-packages"}}},"time":{"created":"2019-06-03T11:56:55.131Z","modified":"2026-09-25T20:24:29.191Z","0.0.1":"2019-06-03T11:56:55.493Z","1.0.0":"2020-12-11T12:42:12.686Z"},"bugs":{"url":"https://github.com/Automattic/wp-calypso/issues"},"author":{"name":"Automattic Inc."},"license":"GPL-2.0-or-later","homepage":"https://github.com/Automattic/wp-calypso/tree/HEAD/packages/webpack-inline-constant-exports-plugin","keywords":["webpack"],"repository":{"url":"git+https://github.com/Automattic/wp-calypso.git","type":"git","directory":"packages/webpack-inline-constant-exports-plugin"},"description":"Webpack plugin to inline constant exports from modules","maintainers":[{"email":"maciej.brencz@gmail.com","name":"macbre"},{"email":"yuliyan.slavchev@gmail.com","name":"yuliyan"},{"email":"batmoo@gmail.com","name":"mjangda"},{"email":"jetpack+engineering@automattic.com","name":"matticbot"},{"email":"invoices@automattic.com","name":"a8c"},{"email":"ben@blowery.org","name":"blowery"},{"email":"chris@ehg.sh","name":"ehg_"},{"email":"mail@sgomes.io","name":"sgomes"},{"email":"tyxla@abv.bg","name":"tyxla"},{"email":"sarosh.aga@automattic.com","name":"saroshaga"},{"email":"nejc.lovrencic@gmail.com","name":"nejclovrencic"},{"email":"payton@foolord.com","name":"sirbrillig"},{"email":"chris@zarate.org","name":"chriszarate"},{"email":"robersonccgomes@gmail.com","name":"robersongomes"},{"email":"johng75@gmail.com","name":"johngodley"},{"email":"jeremy@tagada.hu","name":"jeherve"},{"email":"dale@automattic.com","name":"daledupreez-a8c"},{"email":"todd.wright@automattic.com","name":"t2dw4t"},{"email":"luis.mulinari@gmail.com","name":"luismulinari"},{"email":"andrea.grassi@automattic.com","name":"andrea-sdl"},{"email":"elazzabi.ahmed@gmail.com","name":"elazzabi"},{"email":"fernando.fernandes@automattic.com","name":"fmfernandes"},{"email":"jon.surrell@gmail.com","name":"sirreal"},{"email":"volodymyr@wildwolf.name","name":"wwa"},{"email":"chihsuan.tw@gmail.com","name":"chihsuan"},{"email":"manzoorwani.jk@gmail.com","name":"manzoorwanijk"},{"email":"matias.emanuel.surdi@automattic.com","name":"msurdi-a8c"},{"email":"newspack@a8c.com","name":"newspack-npm"},{"email":"derek.smart@automattic.com","name":"dsmartg"},{"email":"kavin.keratikasama@automattic.com","name":"kthai15"},{"email":"berislav.grgicak@gmail.com","name":"bgrgicak"},{"email":"robert.sreberski@automattic.com","name":"robertsreberski_a8c"},{"email":"artur.piszek@gmail.com","name":"artpi"},{"email":"jugergo@gmail.com","name":"gmjuhasz"},{"email":"borkweb@gmail.com","name":"borkweb"},{"email":"kat3samsin@gmail.com","name":"kat3samsin"},{"email":"b.basto@gmail.com","name":"brunobasto"},{"email":"douglas.henri@automattic.com","name":"dhenridev"},{"email":"m@mrmurphy.dev","name":"mrmurphy"},{"email":"platform+npm@wpvip.com","name":"wpvip-bot"},{"email":"e.tobiesen@gmail.com","name":"etobiesen"},{"email":"omar@omaralshaker.com","name":"alshakero"},{"email":"arthur791004@gmail.com","name":"arthur791004"},{"email":"peter.petrov89@gmail.com","name":"dilirity"},{"email":"npmjs.corporate906@passinbox.com","name":"mehmoodak"},{"email":"natalia.vidal@automattic.com","name":"natalia.vidal"},{"email":"ivan.ottinger@automattic.com","name":"ivan.ottinger"},{"email":"anand.nalya@gmail.com","name":"anandnalya"},{"email":"anthony.arcangelini@gmail.com","name":"arcangelinis"},{"email":"rdsuarez@gmail.com","name":"retrofox"},{"email":"mayank.chugh@automattic.com","name":"iamchughmayank"},{"email":"mikael@ihminen.org","name":"simison"},{"email":"fredrik@fredrik.computer","name":"fredrikekelund"},{"email":"griffith.chen@automattic.com","name":"griffithchen"},{"email":"josh.boland@automattic.com","name":"jboland8"},{"email":"chriskmnds@gmail.com","name":"chriskmnds"},{"email":"ola@oandre.gal","name":"oandregal"},{"email":"galatanovidiu@gmail.com","name":"galatanovidiu"},{"email":"kangzjnet@gmail.com","name":"kangzj"},{"email":"lena@jaguchi.com","name":"_mirka_"},{"email":"andrew@andrewduthie.com","name":"aduth"},{"email":"emanuele.buccelli@automattic.com","name":"ebuccelli"}],"readme":"# webpack-inline-constant-exports-plugin\n\nDetects that bindings exported from a module are constants and inlines them at the usage site.\n\n_constants.js_\n\n```js\nexport const BLOGGER = 'BLOGGER_PLAN'; // strings\nexport const PREMIUM = 'PREMIUM_PLAN';\nexport const MONTHS_IN_YEAR = 12; // numbers\nexport const MONTLY_BILLING = false; // boolean\nexport const NO_PLAN = null; // null\n```\n\n_app.js_\n\n```js\nimport { BLOGGER, PREMIUM } from './constants';\n\nconsole.log( BLOGGER, PREMIUM );\n```\n\nIf the `constants.js` file is marked as constants module, eligible constants (strings, numbers,\nbooleans, anything that's `===`-equal to each other even for different instances) will be inlined\ninto the importing module and the actual import will be removed:\n\n_bundled-app.js_\n\n```js\nconsole.log( 'BLOGGER_PLAN', 'PREMIUM_PLAN' );\n```\n\n## Usage\n\n_webpack.config.js_\n\n```js\nconst InlineConstantExportsPlugin = require( '@automattic/webpack-inline-constant-exports-plugin' );\n\nmodule.exports = {\n\tplugins: [ new InlineConstantExportsPlugin( [ /\\/constants.js/ ] ) ],\n};\n```\n\nThe constructor argument is an array of regexp matchers: if a matcher matches a module resource\npath, the module will be treated as an constant-exporting one and these exports will be inlined.\n\n## Side Effects\n\nIf you import bindings from a constants module:\n\n```js\nimport { BLOGGER, PREMIUM } from './constants';\n```\n\nit is assumed that the module is imported only to get the constant bindings, and not for its\nside effects. The import will be removed if all the imported bindings were inlined and the\npotential side effects will not be performed.\n\nIn other words, it's like the module declared `sideEffects: false` in its `package.json`.\n","readmeFilename":"README.md"}