{"id":13757720,"url":"https://github.com/fliphub/d-l-l","last_synced_at":"2025-04-10T06:33:01.232Z","repository":{"id":143903234,"uuid":"88379971","full_name":"fliphub/d-l-l","owner":"fliphub","description":"Simplified DLL config creator \u0026 handler","archived":false,"fork":false,"pushed_at":"2017-06-13T10:12:36.000Z","size":98,"stargazers_count":29,"open_issues_count":7,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T07:39:22.544Z","etag":null,"topics":["config","dll","dll-plugin","dllplugin","dynamically-linked-library","webpack"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fliphub.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-04-15T23:33:39.000Z","updated_at":"2024-04-13T09:54:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"8e99f6e6-ee27-4a3e-8223-e89e7d884a33","html_url":"https://github.com/fliphub/d-l-l","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fliphub%2Fd-l-l","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fliphub%2Fd-l-l/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fliphub%2Fd-l-l/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fliphub%2Fd-l-l/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fliphub","download_url":"https://codeload.github.com/fliphub/d-l-l/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247761052,"owners_count":20991532,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["config","dll","dll-plugin","dllplugin","dynamically-linked-library","webpack"],"created_at":"2024-08-03T12:00:46.715Z","updated_at":"2025-04-10T06:33:01.190Z","avatar_url":"https://github.com/fliphub.png","language":"JavaScript","funding_links":[],"categories":["My Fluent Packages"],"sub_categories":[],"readme":"# ⚡🤸 d-l-l\n\n[![NPM version][d-l-l-npm-image]][d-l-l-npm-url]\n[![MIT License][license-image]][license-url]\n[![fliphub][gitter-badge]][gitter-url]\n[![flipfam][flipfam-image]][flipfam-url]\n\n[d-l-l-npm-image]: https://img.shields.io/npm/v/d-l-l.svg\n[d-l-l-npm-url]: https://npmjs.org/package/d-l-l\n[license-image]: http://img.shields.io/badge/license-MIT-blue.svg?style=flat\n[license-url]: https://spdx.org/licenses/MIT\n[gitter-badge]: https://img.shields.io/gitter/room/fliphub/pink.svg\n[gitter-url]: https://gitter.im/fliphub/Lobby\n[flipfam-image]: https://img.shields.io/badge/%F0%9F%8F%97%20%F0%9F%92%A0-flipfam-9659F7.svg\n[flipfam-url]: https://www.npmjs.com/package/flipfam\n\n\u003e easy, automatic, optimized dll config handler for webpack\n\n\n## 📦 install\n```bash\nyarn add d-l-l --dev\nnpm i d-l-l --save-dev\n```\n\n### [📘 examples](https://github.com/fliphub/d-l-l/tree/master/examples)\n- [react/inferno](https://github.com/fliphub/d-l-l/tree/master/examples/frontend)\n- [node](https://github.com/fliphub/d-l-l/tree/master/examples/node)\n#### [🌐 full api](https://github.com/fliphub/d-l-l/wiki/%F0%9F%8C%90-api)\n#### [⚙ advanced config examples][docs-config]\n#### [🔗 read more webpack dll plugins][docs-resources]\n## [🔬 tests](./test)\n\n\n## 👋 intro\n\nWebpack's [Dll and DllReference plugins][docs-resources] are a way to split a large JavaScript project into multiple bundles which can be compiled independently. They can be used to [optimize build times][docs-ss] (both full and incremental) and improve caching for users by putting code which changes infrequently into separate \"library\" bundles. [- Robert Knight](https://robertknight.github.io/posts/webpack-dll-plugins/ \"Dynamically Linked Library\")\n\nUnfortunately, the DLL plugins come with some problems.\n\nℹ️️ This package aims to provide solutions for them by allowing you to pass in any existing webpack config, then get it back decorated with dll-reference-plugins and ([only when needed][docs-how]) a whole dll-plugin-only config prepended!\n\n\n### ❎ problems with dll plugin:\n  - can be a pain to configure\n  - requires manually adding plugins, and the entry points in your source code alongside the package dependencies\n  - requires multiple config files\n  - requires multiple build scripts\n  - requires manual cache busting when you change code, which makes it difficult to dynamically include code that does not often change\n  - does not work without even more configuration on nodejs\n\n### ✅ solution\n  - [no need][docs-how] to have double config files or double build scripts just for dll\n  - [adding files][docs-find] [that do not change often][docs-lastmodified]\n  - [adding package dependencies][docs-pkg] with easy filtering\n  - [easy (even one line) setup][docs-auto]\n  - [clearing the cache automatically when needed][docs-how]\n\n## 🖼️ screenshots\n\n##### without d-l-l\n\u003cimg width=\"356\" alt=\"without d-l-l manual\" src=\"https://cloud.githubusercontent.com/assets/4022631/25068619/3008b32c-221e-11e7-8467-267e3827e8c9.png\"\u003e\n\n\n##### with d-l-l\n\u003cimg width=\"228\" alt=\"with-d-l-l\" src=\"https://cloud.githubusercontent.com/assets/4022631/25068618/300768a0-221e-11e7-9f89-cf19885dea98.png\"\u003e\n\n\n## ❔ how\n\nWebpack allows exporting an array of configs, so when required, a DLL-only config is created using the provided config(s) \u0026 prepended to the array of configs.\n\nCache files are created in a `.fliphub` folder (_can be safely added to gitignore, similar to [.happypack][happypack-cache] or similar_).\nThis helps to provide some smart-ish checks:\n\n_✚ = (dll config will be prepended)_\n\n0. when no cache exists, ✚\n1. when there are no manifest files, ✚\n2. when [cache-busting-files][docs-cache] change, the cache is busted and ✚\n3. [every X (default 33) builds][docs-everyx] ✚\n4. [after a day since the last build][docs-staletime] ✚\n\n[see the src code][src-shouldBuildDLL]\n\n## 📖 usage - custom\n\n```js\n// webpack.config.js\nconst DLL = require('d-l-l')\n\nconst dll = new DLL()\nconst configs = dll\n  .dir(__dirname)\n  .config(config)\n  // (dependencies, dev, all)\n  .pkgDeps(deps =\u003e deps.filter(dep =\u003e !/lodash/.test(dep)))\n  .toConfig()\n\nmodule.exports = configs\n```\n\n\n## 👾 easy full auto usage\n\n```js\n// webpack.config.js\nconst DLL = require('d-l-l')\n\nconst dll = new DLL()\nconst configs = dll\n  .dir(__dirname)\n  .config(config)\n  .find()\n  // defaults to bundledDependencies, fallback to dependencies\n  .pkgDeps()\n  .toConfig()\n\nmodule.exports = configs\n```\n\n\n[docs-resources]: https://github.com/fliphub/d-l-l/wiki/%F0%9F%94%97-resources\n[docs-config]: https://github.com/fliphub/d-l-l/wiki/%E2%9A%99-configs\n[docs-how]: https://github.com/fliphub/d-l-l/wiki/%E2%9A%A1%F0%9F%A4%B8-d-l-l#-how\n[docs-ss]: https://github.com/fliphub/d-l-l/wiki/%E2%9A%A1%F0%9F%A4%B8-d-l-l#%EF%B8%8F-screenshots\n[docs-auto]: https://github.com/fliphub/d-l-l/wiki/%F0%9F%8C%90-api#auto-static\n[docs-find]: https://github.com/fliphub/d-l-l/wiki/%F0%9F%8C%90-api#find\n[docs-lastmodified]: https://github.com/fliphub/d-l-l/wiki/%F0%9F%8C%90-api#lastmodifiedfilter\n[docs-how]: https://github.com/fliphub/d-l-l/wiki/%F0%9F%8C%90-api#find\n[docs-pkg]: https://github.com/fliphub/d-l-l/wiki/%F0%9F%8C%90-api#pkgdeps\n[docs-cache]: https://github.com/fliphub/d-l-l/wiki/%F0%9F%8C%90-api#cachebustingfiles\n[docs-everyx]: https://github.com/fliphub/d-l-l/wiki/%F0%9F%8C%90-api#everyx\n[docs-staletime]: https://github.com/fliphub/d-l-l/wiki/%F0%9F%8C%90-api#staletime\n\n[src-shouldBuildDLL]: https://github.com/fliphub/d-l-l/tree/master/index.js#449\n\n[happypack-cache]: https://github.com/amireh/happypack#cachepath-string\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffliphub%2Fd-l-l","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffliphub%2Fd-l-l","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffliphub%2Fd-l-l/lists"}