{"_id":"@effortlessmotion/dynamic-cdn-webpack-plugin","_rev":"2-fca8d8adc071a0556c5b231e98da3624","name":"@effortlessmotion/dynamic-cdn-webpack-plugin","dist-tags":{"latest":"5.0.1"},"versions":{"5.0.0":{"name":"@effortlessmotion/dynamic-cdn-webpack-plugin","version":"5.0.0","description":"Dynamically get your dependencies from a cdn rather than bundling them in your app","license":"MIT","repository":{"type":"git","url":"git+https://github.com/mastilver/dynamic-cdn-webpack-plugin.git"},"author":{"name":"Thomas Sileghem","email":"th.sileghem@gmail.com","url":"https://github.com/mastilver"},"engines":{"node":">=10.13.0"},"main":"index.js","scripts":{"prepublishOnly":"xo","test":"nyc tap test/**/*.test.js","lint":"xo","lint:fix":"xo --fix","version":"all-contributors generate","add-contributor":"all-contributors add"},"keywords":["webpack","cdn","unpkg.com","html-webpack-plugin","webpack-manifest-plugin","html","script","assets","externals"],"dependencies":{"module-to-cdn":"^3.1.5","read-pkg-up":"^7.0.1","resolve-pkg":"^2.0.0"},"peerDependencies":{"webpack":">=5"},"devDependencies":{"all-contributors-cli":"^6.20.0","codecov":"^3.8.2","html-webpack-plugin":"^5.3.2","mz":"^2.7.0","nyc":"^15.1.0","rimraf":"^3.0.2","tap":"^15.0.9","webpack":"^5.42.0","webpack-manifest-plugin":"3.1.1","xo":"^0.40.3"},"xo":{"esnext":true,"space":4,"rules":{"eqeqeq":"off","no-eq-null":"off","curly":"off","import/extensions":"off","node/file-extension-in-import":"off","unicorn/prefer-module":"off","unicorn/prefer-node-protocol":"off","unicorn/no-array-reduce":"off","unicorn/prefer-spread":"off","func-names":"off"},"ignores":["test/fixtures/**/*.js"]},"nyc":{"reporter":["lcov","text"]},"gitHead":"27022a410adfcec42cb33e2ecac70163e3039914","bugs":{"url":"https://github.com/mastilver/dynamic-cdn-webpack-plugin/issues"},"homepage":"https://github.com/mastilver/dynamic-cdn-webpack-plugin#readme","_id":"@effortlessmotion/dynamic-cdn-webpack-plugin@5.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"kmalakoff","email":"kmalakoff@gmail.com"},"dist":{"integrity":"sha512-sAVmEvo5UJAjwI2zkscoZqUY/NG4nnTSnXyVjv5hsO72BspBwX1mHM1lVOwAIH2r1u7iAhaqx4U+wM5B7U0IVA==","shasum":"d79b8765d81ddc7324ed885cdb12744653c9e216","tarball":"https://registry.npmjs.org/@effortlessmotion/dynamic-cdn-webpack-plugin/-/dynamic-cdn-webpack-plugin-5.0.0.tgz","fileCount":7,"unpackedSize":17137,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg4R/0CRA9TVsSAnZWagAA/BIQAIh/UKdAhNDUD5/la61v\np7kpWrdt1E/uvQjAVIJB00bKdM/diCVPc/SpZI5kNrhjjr34KzJOvURijLb/\njHCB3XTp7IOPwwpFWAmfzNH8aZThxQxPsw9tkIyl2gdKO726S79/sEme4IuU\nEqD7dJXNcD6R+BPEcyzOuC8rTBFVYgIgap46EJivNfb4k/WpSBOAxP7tWIiL\nV6NJycrGfHOQd4eHchvKGqEPcZtwZAosZvwVdsTg1PWtEhgdNx4YTfabUdB3\nja/ffj/O9GtLvbbc+Rx5a8WjjbiZTgZXum/aHdQJKqoNcmKGn2Gu0oh3h0Td\nR+DJnQg7OBXV/4yjbPegJ5KaAQeBR/JBjLm6lA6/bWz40Oom2O3vdjhwbr66\nduuZPP8OyJe4hKEx+W1f8qcwKSeUYSsGtBskWQinX9ESxOxg2kj7W/uCdFnH\nGpejczu5n/30jm+sT6bM1HqIdhrrvYxQa9vacykt/ylsFZ65nvZl3XhWBGOE\n5lChvGI6BPkqscHM2LXvguCstilp/6ZFLwb4rsEgKuYz1Jpyejjf69FXR2bx\nVWHmHzAhPcilhiYlxv6/KDEL2JY98SatUc2ghBUrowe+KKTQiY5gP2XGbb6W\nNeWhwSQFmM0ZvbkD1vqKF3VjXGrfQLT1XaYYO1D/Qsjg77Ez9/TsLarkut29\nQWbW\r\n=6PhJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7uDRmQvqN5sArXU0pmuP7xWBO7UcYxFeAv6l595CPxgIhAPSyIZqbNwYwfg6sYzP3xa4N/MMtVNvi+iLCY8D3D7ID"}]},"directories":{},"maintainers":[{"name":"kmalakoff","email":"kmalakoff@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dynamic-cdn-webpack-plugin_5.0.0_1625366515576_0.6248234207639796"},"_hasShrinkwrap":false},"5.0.1":{"name":"@effortlessmotion/dynamic-cdn-webpack-plugin","version":"5.0.1","description":"Dynamically get your dependencies from a cdn rather than bundling them in your app","license":"MIT","repository":{"type":"git","url":"git+https://github.com/mastilver/dynamic-cdn-webpack-plugin.git"},"author":{"name":"Thomas Sileghem","email":"th.sileghem@gmail.com","url":"https://github.com/mastilver"},"engines":{"node":">=10.13.0"},"main":"index.js","scripts":{"prepublishOnly":"xo","test":"nyc tap test/**/*.test.js","lint":"xo","lint:fix":"xo --fix","version":"all-contributors generate","add-contributor":"all-contributors add"},"keywords":["webpack","cdn","unpkg.com","html-webpack-plugin","webpack-manifest-plugin","html","script","assets","externals"],"dependencies":{"module-to-cdn":"^3.1.5","read-pkg-up":"^7.0.1","resolve-pkg":"^2.0.0"},"peerDependencies":{"webpack":">=5"},"devDependencies":{"all-contributors-cli":"^6.20.0","codecov":"^3.8.2","html-webpack-plugin":"^5.3.2","mz":"^2.7.0","nyc":"^15.1.0","rimraf":"^3.0.2","tap":"^15.0.9","webpack":"^5.42.0","webpack-manifest-plugin":"3.1.1","xo":"^0.40.3"},"xo":{"esnext":true,"space":4,"rules":{"eqeqeq":"off","no-eq-null":"off","curly":"off","import/extensions":"off","node/file-extension-in-import":"off","unicorn/prefer-module":"off","unicorn/prefer-node-protocol":"off","unicorn/no-array-reduce":"off","unicorn/prefer-spread":"off","func-names":"off"},"ignores":["test/fixtures/**/*.js"]},"nyc":{"reporter":["lcov","text"]},"gitHead":"e4a1d4799e7a8d73e0c415f14e1ed463ce1d4293","bugs":{"url":"https://github.com/mastilver/dynamic-cdn-webpack-plugin/issues"},"homepage":"https://github.com/mastilver/dynamic-cdn-webpack-plugin#readme","_id":"@effortlessmotion/dynamic-cdn-webpack-plugin@5.0.1","_nodeVersion":"14.17.2","_npmVersion":"7.19.1","dist":{"integrity":"sha512-n7EHA7z+d3B0LnENZXkGf0dEVeYaH3uaDEgTmU03+spvkj3L0wM3XFR+Y8NlBZ4R6LgTv9xeX0rzoMsd0m5jQQ==","shasum":"ac65d61897b094d5f269bde9ddc83560c57707d1","tarball":"https://registry.npmjs.org/@effortlessmotion/dynamic-cdn-webpack-plugin/-/dynamic-cdn-webpack-plugin-5.0.1.tgz","fileCount":6,"unpackedSize":16110,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg4UWwCRA9TVsSAnZWagAAc48P/RbLr9sXRxSV0Qu7eFz5\nn9TbORjxJHxSiYI/T1JEzCQzHYJmGEzAQcKSM4KsS+O8N5Z4yaEmhDJfQdMJ\nFlsYL8tDh6GbI3MkeBCANnXI5lJ05JJ3XSXw6mLsH4414mrOj6P8FlPAo1dJ\nbY2IzPcn5TQzxPwPEqQ8/tIdrvQMY8PNrpPTh9w6fzyHjUi8xq0fYXGD7dVV\nZgqnRybb9z7jP6Pw6oqbEgLZChCIbm6JKwFBfDWPo8PC0m1Zl0rZjusY6MnU\n/xYb49f4x/HojGpfnhqsWvBxbd1tUsllHb7KeRHzmoXTrs7xpl7b3ohCSlIT\n4m6ODxoTwxfoJMVxB1kG4FZ1caeqf6TpGGULuBQukGYXsh6nfwhXP1xsi8nA\ncNj0Gq0TxCf0FxhbMuMCxUH0U3mSH2Q+lCTHWtaJns3eMpbJ2zkzl/ukQ+1X\ny1JZg6L7jiGxo8QzLDef6HVOwStuNHcxjZsdkZdqy72EE5wjLQ95t0E+tWxp\nCcgNvaW9hfFd6AZ4Ht0vS8zl/VTRSkvjhncabH4Rel973nYipsNte4pgKNEV\n+/1nLiesLZsdGGbf3nG3J8qiePYkGbfSCS7mNdDC9fjKaQe07/jFFGyPFUJv\nlJHyyv5Y2hZzm1yqU1Px/VK1ffp+x4B4XaSJLEB+/ta6BVW1i5CGU8+g4xMP\nNKfb\r\n=FG0j\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGtIK5B0rOgMlpg6RJnbjeuOkoe727EbFlQ1gFlb0TtmAiBjgR/WspaM9hl6jJrErdmcNEhQD8VX01b/w8eMzea+5w=="}]},"_npmUser":{"name":"kmalakoff","email":"kmalakoff@gmail.com"},"directories":{},"maintainers":[{"name":"kmalakoff","email":"kmalakoff@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dynamic-cdn-webpack-plugin_5.0.1_1625376176581_0.6193760848328489"},"_hasShrinkwrap":false}},"time":{"created":"2021-07-04T02:41:55.181Z","5.0.0":"2021-07-04T02:41:55.700Z","modified":"2022-04-05T06:50:44.392Z","5.0.1":"2021-07-04T05:22:56.706Z"},"maintainers":[{"name":"kmalakoff","email":"kmalakoff@gmail.com"}],"description":"Dynamically get your dependencies from a cdn rather than bundling them in your app","homepage":"https://github.com/mastilver/dynamic-cdn-webpack-plugin#readme","keywords":["webpack","cdn","unpkg.com","html-webpack-plugin","webpack-manifest-plugin","html","script","assets","externals"],"repository":{"type":"git","url":"git+https://github.com/mastilver/dynamic-cdn-webpack-plugin.git"},"author":{"name":"Thomas Sileghem","email":"th.sileghem@gmail.com","url":"https://github.com/mastilver"},"bugs":{"url":"https://github.com/mastilver/dynamic-cdn-webpack-plugin/issues"},"license":"MIT","readme":"# dynamic-cdn-webpack-plugin\n\n[![npm](https://img.shields.io/npm/v/dynamic-cdn-webpack-plugin.svg)](https://www.npmjs.com/package/dynamic-cdn-webpack-plugin) [![Build Status](https://travis-ci.org/mastilver/dynamic-cdn-webpack-plugin.svg?branch=master)](https://travis-ci.org/mastilver/dynamic-cdn-webpack-plugin) [![codecov](https://codecov.io/gh/mastilver/dynamic-cdn-webpack-plugin/badge.svg?branch=master)](https://codecov.io/gh/mastilver/dynamic-cdn-webpack-plugin?branch=master) [![David](https://img.shields.io/david/mastilver/dynamic-cdn-webpack-plugin.svg)](https://david-dm.org/mastilver/dynamic-cdn-webpack-plugin) [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)\n\n> Dynamically get your dependencies from a cdn rather than bundling them in your app\n\nWarning: This module is a fork from [https://github.com/mastilver/dynamic-cdn-webpack-plugin](https://github.com/mastilver/dynamic-cdn-webpack-plugin) to support Webpack 5.\n\n## Install\n\n```\n$ npm install --save-dev dynamic-cdn-webpack-plugin module-to-cdn\n```\n\n## Compatibility with webpack\n\nIf you are using `webpack --version <= 3` then you should be installing with the following command.\n\n```\n$ npm install --save-dev dynamic-cdn-webpack-plugin@3.4.1 module-to-cdn\n```\n\n## Usage with HtmlWebpackPlugin\n\n`webpack.config.js`<br>\n```js\nconst path = require('path');\n\nconst HtmlWebpackPlugin = require('html-webpack-plugin');\nconst DynamicCdnWebpackPlugin = require('dynamic-cdn-webpack-plugin');\n\nmodule.exports = {\n    entry: {\n        'app.js': './src/app.js'\n    },\n\n    output: {\n        path.resolve(__dirname, './build'),\n    },\n\n    plugins: [\n        new HtmlWebpackPlugin(),\n        new DynamicCdnWebpackPlugin()\n    ]\n}\n```\n\n`app.js`<br>\n```js\nimport React from 'react';\nimport { BrowserRouter } from 'react-router-dom';\n\n// ... do react stuff\n```\n\n`webpack --mode=production` will generate:\n\n```js\n/* simplified webpack build */\n[function(module, __webpack_exports__, __webpack_require__) {\n    module.exports = React;\n}),\n(function(module, __webpack_exports__, __webpack_require__) {\n    module.exports = ReactRouterDOM;\n}),\n(function(module, __webpack_exports__, __webpack_require__) {\n    var react = __webpack_require__(0);\n    var reactRouterDOM = __webpack_require__(1);\n\n    /* ... */\n})]\n```\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <meta charset=\"UTF-8\">\n    <title>Webpack App</title>\n  </head>\n  <body>\n    <script type=\"text/javascript\" src=\"https://unpkg.com/react@15.5.3/dist/react.min.js\"></script><script type=\"text/javascript\" src=\"https://unpkg.com/react-router-dom@4.1.1/umd/react-router-dom.min.js\"></script><script src=\"build/app.js\"></script></body>\n</html>\n```\n\n## Usage with ManifestPlugin\n\n`webpack.config.js`<br>\n```js\nconst path = require('path');\n\nconst ManifestPlugin = require('webpack-manifest-plugin');\nconst DynamicCdnWebpackPlugin = require('dynamic-cdn-webpack-plugin');\n\nmodule.exports = {\n    entry: {\n        'app': './src/app.js'\n    },\n\n    output: {\n        path.resolve(__dirname, './build'),\n    },\n\n    plugins: [\n        new ManifestPlugin({\n            fileName: 'manifest.json'\n        }),\n        new DynamicCdnWebpackPlugin()\n    ]\n}\n```\n\n`app.js`<br>\n```js\nimport React from 'react';\nimport { BrowserRouter } from 'react-router-dom';\n\n// ... do react stuff\n```\n\n`webpack --mode=production` will generate:\n\n```js\n/* simplified webpack build */\n[function(module, __webpack_exports__, __webpack_require__) {\n    module.exports = React;\n}),\n(function(module, __webpack_exports__, __webpack_require__) {\n    module.exports = ReactRouterDOM;\n}),\n(function(module, __webpack_exports__, __webpack_require__) {\n    var react = __webpack_require__(0);\n    var reactRouterDOM = __webpack_require__(1);\n\n    /* ... */\n})]\n```\n\n```json\n{\n    \"app.js\": \"app.js\",\n    \"react.js\": \"https://unpkg.com/react@15.5.3/dist/react.min.js\",\n    \"react-router-dom.js\": \"https://unpkg.com/react-router-dom@4.1.1/umd/react-router-dom.min.js\"\n}\n```\n\n\n## API\n\n### DynamicCdnWebpackPlugin(options)\n\n`webpack.config.js`<br>\n```js\nconst DynamicCdnWebpackPlugin = require('dynamic-cdn-webpack-plugin');\n\nmodule.exports = {\n    mode: 'production',\n    plugins: [\n        new DynamicCdnWebpackPlugin(options)\n    ]\n}\n```\n\n#### options.disable\n\nType: `boolean`<br>\nDefault: `false`\n\nUseful when working offline, will fallback to webpack normal behaviour\n\n#### options.env\n\nType: `string`<br>\nDefault: `mode`<br>\nValues: `development`, `production`\n\nDetermine if it should load the development or the production version of modules\n\n#### options.only\n\nType: `Array<string>`\nDefault: `null`\n\nList the only modules that should be served by the cdn\n\n#### options.exclude\n\nType: `Array<string>`\nDefault: `[]`\n\nList the modules that will always be bundled (not be served by the cdn)\n\n#### options.verbose\n\nType: `boolean`<br>\nDefault: `false`\n\nLog whether the library is being served by the cdn or is bundled\n\n#### options.resolver\nType: `string`, `function`<br>\nDefault: `'module-to-cdn'`\n\nAllow you to define a custom module resolver, it can either be a `function` or an npm module.\nThe resolver should return (or resolve as a Promise) either `null` or an `object` with the keys: `name`, `var`, `url`, `version`.\n\n\n## Related\n\n- [html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin)\n- [module-to-cdn](https://github.com/mastilver/module-to-cdn)\n\n\n## Contributors\n\nThanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):\n\n<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable -->\n<table>\n  <tr>\n    <td align=\"center\"><a href=\"https://github.com/mastilver\"><img src=\"https://avatars3.githubusercontent.com/u/4112409?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Thomas Sileghem</b></sub></a><br /><a href=\"https://github.com/mastilver/dynamic-cdn-webpack-plugin/commits?author=mastilver\" title=\"Code\">💻</a> <a href=\"https://github.com/mastilver/dynamic-cdn-webpack-plugin/commits?author=mastilver\" title=\"Documentation\">📖</a> <a href=\"https://github.com/mastilver/dynamic-cdn-webpack-plugin/commits?author=mastilver\" title=\"Tests\">⚠️</a></td>\n    <td align=\"center\"><a href=\"https://github.com/aulisius\"><img src=\"https://avatars2.githubusercontent.com/u/6629172?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>​Faizaan</b></sub></a><br /><a href=\"#question-aulisius\" title=\"Answering Questions\">💬</a> <a href=\"https://github.com/mastilver/dynamic-cdn-webpack-plugin/commits?author=aulisius\" title=\"Code\">💻</a> <a href=\"https://github.com/mastilver/dynamic-cdn-webpack-plugin/commits?author=aulisius\" title=\"Documentation\">📖</a></td>\n    <td align=\"center\"><a href=\"https://twitter.com/mjackson\"><img src=\"https://avatars0.githubusercontent.com/u/92839?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>MICHAEL JACKSON</b></sub></a><br /><a href=\"https://github.com/unpkg/unpkg-demos\" title=\"Examples\">💡</a></td>\n    <td align=\"center\"><a href=\"http://blog.fedeoo.cn/\"><img src=\"https://avatars2.githubusercontent.com/u/5313455?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>fedeoo</b></sub></a><br /><a href=\"https://github.com/mastilver/dynamic-cdn-webpack-plugin/pull/21\" title=\"Code\">💻</a></td>\n    <td align=\"center\"><a href=\"http://effortlessmotion.com/\"><img src=\"https://avatars.githubusercontent.com/u/756520?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Kevin Malakoff</b></sub></a><br /><a href=\"https://github.com/mastilver/dynamic-cdn-webpack-plugin/commits?author=kmalakoff\" title=\"Code\">💻</a></td>\n  </tr>\n</table>\n\n<!-- markdownlint-restore -->\n<!-- prettier-ignore-end -->\n\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n\nThis project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!\n\n\n## License\n\nMIT © [Thomas Sileghem](http://mastilver.com)\n","readmeFilename":"README.md"}