{"_id":"@berhalak/dedup-resolve-webpack-plugin","_rev":"2-946d988d458c6cb00fa754508340b4f6","name":"@berhalak/dedup-resolve-webpack-plugin","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@berhalak/dedup-resolve-webpack-plugin","version":"0.1.0","description":"Webpack plugin that resolves copies of the same module in different locations to a single path.","main":"index.js","homepate":"https://github.com/berhalak/dedup-resolve-webpack-plugin","repository":{"type":"git","url":"git+https://github.com/berhalak/dedup-resolve-webpack-plugin.git"},"author":{"name":"Robo Burned"},"license":"MIT","engines":{"node":">=6.0.0"},"scripts":{"lint":"node node_modules/eslint/bin/eslint.js src lib test"},"devDependencies":{"eslint":"^4.9.0","eslint-config-standard":"^10.2.1","eslint-plugin-import":"^2.7.0","eslint-plugin-node":"^5.2.0","eslint-plugin-promise":"^3.6.0","eslint-plugin-standard":"^3.0.1"},"gitHead":"2d0a9921f665c9bc5c61288631dad1b7c0c95367","bugs":{"url":"https://github.com/berhalak/dedup-resolve-webpack-plugin/issues"},"homepage":"https://github.com/berhalak/dedup-resolve-webpack-plugin#readme","_id":"@berhalak/dedup-resolve-webpack-plugin@0.1.0","_nodeVersion":"12.8.1","_npmVersion":"6.14.2","dist":{"integrity":"sha512-HPQWudO9wynn5KVItGIWJ9vpp6EI//BDUD89yOedXpOn8imWIdjbsUQzwzEe5eay8Kc0ElwCNYRtQBTA9aMXvQ==","shasum":"4cf8a659e2af2793ae53138aa152c823b654a6a3","tarball":"https://registry.npmjs.org/@berhalak/dedup-resolve-webpack-plugin/-/dedup-resolve-webpack-plugin-0.1.0.tgz","fileCount":6,"unpackedSize":5533,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeZmVvCRA9TVsSAnZWagAArWcP/AuFS5Dc+wtUkqCLGrAU\nD2AU3/RlicQCEGfk6doMmY3ocohXSDG+LO2at7IZ97ywF9Nm0DticLl/gaJ+\n5ISqHSeyZrh/gpDzovqPaWWyF6E/d4JhJf+SgswbuAGthaUOos7EjZIlUGfM\nQqxuJfO1IB07y9ak2pEUQ3mDbGLNTFd9D0X5qpJtbvPMP2Qq5+pG4eJvDjkP\n/BficFKdMzRCkApyAiW0xeQ8n8Z9rLvwY0K3AIXVWnj1iqLYbuGST3RQk2En\nOFW7flCGbO4lVOGrLkeQPXkpIBQFY/KroWnFlSfS60DtRZrH6JjB5T8Q9EI7\nLTKEFJz+M2m2b7HTBUmDKR1+JU65R8R9D1SqMzUPmhjCqJtiihl8p89tQunQ\nAI1g9FeISLXZYDHtuIUE1/KiRytB9F9tldw07ogo2RG0i+pDwnPpCGItxdxc\nsdcy0F1RpkCYjeou1RWJ1FE26RoG27ePaz52Nd5eOHucK53HLIeuiZ2r3ETu\nNGpY3zrLLzL2w3+ObsdcMBq9I+XdNm9C87slnz8gBjmU1l1SYtT3k1WqGRJT\nJ39x5wM/kelEJGfAWWj86aPgRJJ1eaRDK7jNDTiVkBQSCjnQCcgZxHvKkoBF\nW50U/mYU4+xcwaHzmzbCg9g5jr2R/JACYUcIBD9dxxwd1394zKuNZEDWjh5m\nKQ6v\r\n=+r/H\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICJf6QfgZ+VGRqDxT33ylEpvehaUCvuYkR4uYgukCSk7AiEAqc6edb6p2F9w5QVOTmt+amgT9tga4+E7+r/l2LaaVq0="}]},"maintainers":[{"name":"berhalak","email":"jaroslaw.sadzinski+npm@gmail.com"}],"_npmUser":{"name":"berhalak","email":"jaroslaw.sadzinski+npm@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dedup-resolve-webpack-plugin_0.1.0_1583768942845_0.2948433531114576"},"_hasShrinkwrap":false},"0.1.1":{"name":"@berhalak/dedup-resolve-webpack-plugin","version":"0.1.1","description":"Webpack plugin that resolves copies of the same module in different locations to a single path.","main":"index.js","homepate":"https://github.com/berhalak/dedup-resolve-webpack-plugin","repository":{"type":"git","url":"git+https://github.com/berhalak/dedup-resolve-webpack-plugin.git"},"author":{"name":"Robo Burned"},"license":"MIT","engines":{"node":">=6.0.0"},"scripts":{"lint":"node node_modules/eslint/bin/eslint.js src lib test"},"devDependencies":{"eslint":"^4.9.0","eslint-config-standard":"^10.2.1","eslint-plugin-import":"^2.7.0","eslint-plugin-node":"^5.2.0","eslint-plugin-promise":"^3.6.0","eslint-plugin-standard":"^3.0.1"},"gitHead":"e7ce59ec5089e598c21a0b5bf1a3b6b45081bd3b","bugs":{"url":"https://github.com/berhalak/dedup-resolve-webpack-plugin/issues"},"homepage":"https://github.com/berhalak/dedup-resolve-webpack-plugin#readme","_id":"@berhalak/dedup-resolve-webpack-plugin@0.1.1","_nodeVersion":"10.18.1","_npmVersion":"6.13.6","dist":{"integrity":"sha512-l+BsAQuYLX5zBLsi1kIs5Xho2gMUeFI1bJTI9LaRNiFqL+CYfwDoSBxDXq6/6RpZbBslNL23+qmKH0GA2DK1YA==","shasum":"f37a54cc44a3567975bd3191943dd2cc2222f430","tarball":"https://registry.npmjs.org/@berhalak/dedup-resolve-webpack-plugin/-/dedup-resolve-webpack-plugin-0.1.1.tgz","fileCount":6,"unpackedSize":5890,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJegJFTCRA9TVsSAnZWagAAxBoQAJpeulQDmqllnMO9Qzf2\niiCO1CK0GB8uXWikM5a2SMZeeoI5xmFdgVyjhr9w4yUvfDg6RMOFs3RLpoqZ\nCmesrkHIPV0Z4C2eUXNY/5nu0Ay7LEyJbdPNeRoRGNCL2dbf0gz568SpaUjK\nXbFvjFs20k+QdvPx+HBX8ubQnjboA+qLDoitYzS+SahbWtLFqOx+T3dsgxC0\nhdnTJq3LJl/4Bcxikh43wL7130BxMR/cAtUZoDdNCKSI+OBy0hn2x12unu1h\nhKfmuSdYPZqMpnemY9ffpfYnV6t3JczTixycyW+/Vs1D/G/GbfjbjDQegLS6\n1RJHuDF3S5RpQvafVFjt92qFCM98qYuBri4gHWZwTFDoDPGbTI57F0biLEk8\nL/O0ipBsH0py3gKk2WIGkBbjKQli4fAlkJRS/tEeD6UEaYQreZpdBsMkWpFp\nrey5tawOrBKPHkAHy8XXtrCE7mfZn+RJF+bf/KB35uI2+rXSkEolpfNfOw5j\nuiw0/oEmFfXeh8Ynd19H8tQh3AGrQMCDq2IaT7nLJaHzWkF+ptl82sI0otgN\nyelHGVNCPcyCf40emL6Y8UszopAbT3A+Sc0/JnYsNLSuRYGXYuf2nMPU2QlV\nxnLkMadQKDb1r7hxtqBlfh3zWcQ8Ilbv6AihwrRyd7EMQdwdKJGqezy2040m\nyeEn\r\n=tMVT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDY+yxfXJaZR0c9wMrKGo30Ih1JYX6vlBcDalOoHBCJAAIgBojslCchf+Rv2sX2f9V+ohbkVa1pR2ys9jXYq+/GfSs="}]},"maintainers":[{"name":"berhalak","email":"jaroslaw.sadzinski+npm@gmail.com"}],"_npmUser":{"name":"berhalak","email":"jaroslaw.sadzinski+npm@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dedup-resolve-webpack-plugin_0.1.1_1585484114848_0.47545224547509535"},"_hasShrinkwrap":false}},"time":{"created":"2020-03-09T15:49:02.844Z","0.1.0":"2020-03-09T15:49:03.017Z","modified":"2022-04-04T18:28:56.152Z","0.1.1":"2020-03-29T12:15:14.961Z"},"maintainers":[{"name":"berhalak","email":"jaroslaw.sadzinski+npm@gmail.com"}],"description":"Webpack plugin that resolves copies of the same module in different locations to a single path.","homepage":"https://github.com/berhalak/dedup-resolve-webpack-plugin#readme","repository":{"type":"git","url":"git+https://github.com/berhalak/dedup-resolve-webpack-plugin.git"},"author":{"name":"Robo Burned"},"bugs":{"url":"https://github.com/berhalak/dedup-resolve-webpack-plugin/issues"},"license":"MIT","readme":"# dedup-resolve-webpack-plugin\r\nResolves copies of the same module in different locations to a single path.\r\n\r\nThis plugin allows to solve the issue descrived at https://github.com/webpack/webpack/issues/5593.\r\nWhen you use nice libA in your project, and depA and depB also use this cool libA then you will have 3 copies of libA in your resulting bundle. No uglification, tree shaking and other cool features will help you to avoid code duplication.\r\n```\r\nprojectA\r\n- node_modules\r\n-- libA\r\n-- depA\r\n---- node_modules/libA\r\n-- depB\r\n---- node_modules/libA \r\n```\r\nThis plugin will check the dependecies, their versions and will use only one (first) location of libA.\r\n\r\n## Usage:\r\n1. Install the plugin as a development dependency:\r\n\r\n    **Yarn:**\r\n    `yarn add @berhalak/dedup-resolve-webpack-plugin -D`\r\n\r\n    **NPM:**\r\n    `npm install @berhalak/dedup-resolve-webpack-plugin -D`\r\n\r\n2. Require a plugin in webpack configuration file and register it as **resolve** plugin.\r\n```js\r\nvar webpack = require('webpack');\r\nvar DedupPlugin = require('dedup-resolve-webpack-plugin');\r\n\r\nmodule.exports = {\r\n  entry: [\r\n    './src/index.js'\r\n  ],\r\n  module: {\r\n    loaders: [{\r\n      test: /\\.js?$/,\r\n      exclude: /node_modules/,\r\n      loader: 'babel-loader'\r\n    }]\r\n  },\r\n  resolve: {\r\n    extensions: ['.js'],\r\n    plugins: [new DedupPlugin({ path: path.resolve(__dirname, \"node_modules\") })],\r\n  },\r\n  plugins: [/*DO NOT ADD the plugin here. Add it to resolve/plugins section.*/]\r\n}\r\n```\r\n3. If you enabled verbose flag then you will see the output simmilar to the following. It means that both a and b will use debug library from parent location.\r\n```bash\r\n[Dedup]: d:\\Projects\\webpack-dedupe\\node_modules\\b\\node_modules\\debug\r\n      => d:\\Projects\\webpack-dedupe\\node_modules\\debug\r\n[Dedup]: d:\\Projects\\webpack-dedupe\\node_modules\\a\\node_modules\\debug\r\n      => d:\\Projects\\webpack-dedupe\\node_modules\\debug\r\n```\r\n\r\n4. Adding path options, that will help with monorepo. It will keep node_modules under root path.\r\n","readmeFilename":"README.md"}