{"id":13492403,"url":"https://github.com/asfktz/autodll-webpack-plugin","last_synced_at":"2025-10-16T19:11:00.844Z","repository":{"id":57120348,"uuid":"95303444","full_name":"asfktz/autodll-webpack-plugin","owner":"asfktz","description":"Webpack's DllPlugin without the boilerplate","archived":false,"fork":false,"pushed_at":"2019-11-02T06:07:09.000Z","size":2257,"stargazers_count":1451,"open_issues_count":57,"forks_count":79,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-10-08T12:39:15.281Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/asfktz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-24T14:42:30.000Z","updated_at":"2025-10-08T09:38:31.000Z","dependencies_parsed_at":"2022-08-24T02:40:31.184Z","dependency_job_id":null,"html_url":"https://github.com/asfktz/autodll-webpack-plugin","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/asfktz/autodll-webpack-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asfktz%2Fautodll-webpack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asfktz%2Fautodll-webpack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asfktz%2Fautodll-webpack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asfktz%2Fautodll-webpack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asfktz","download_url":"https://codeload.github.com/asfktz/autodll-webpack-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asfktz%2Fautodll-webpack-plugin/sbom","scorecard":{"id":211326,"data":{"date":"2025-08-11","repo":{"name":"github.com/asfktz/autodll-webpack-plugin","commit":"546ccc450b13e4aad7da95d694e3c0a174b9ccfd"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Code-Review","score":1,"reason":"Found 2/12 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 20 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T00:48:58.356Z","repository_id":57120348,"created_at":"2025-08-17T00:48:58.357Z","updated_at":"2025-08-17T00:48:58.357Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279110941,"owners_count":26105907,"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","status":"online","status_checked_at":"2025-10-15T02:00:07.814Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-07-31T19:01:05.687Z","updated_at":"2025-10-16T19:11:00.807Z","avatar_url":"https://github.com/asfktz.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","📦 Legacy \u0026 Inactive Projects"],"sub_categories":[],"readme":"[![Build Status for Linux](https://travis-ci.org/asfktz/autodll-webpack-plugin.svg?branch=master)](https://travis-ci.org/asfktz/autodll-webpack-plugin)\n[![Build Status for Windows](https://ci.appveyor.com/api/projects/status/github/asfktz/autodll-webpack-plugin?branch=master\u0026svg=true)](https://ci.appveyor.com/project/asfktz/autodll-webpack-plugin)\n[![Downloads](https://img.shields.io/npm/dm/autodll-webpack-plugin.svg)](https://www.npmjs.com/package/autodll-webpack-plugin)\n[![Join the chat at https://gitter.im/autodll-webpack-plugin/Lobby](https://badges.gitter.im/autodll-webpack-plugin/Lobby.svg)](https://gitter.im/autodll-webpack-plugin/Lobby?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n\n# Important Note\n\n\nNow, that webpack 5 planning to [support caching out-of-the-box](https://github.com/webpack/webpack/issues/6527),\nAutoDllPlugin will soon be obsolete.\n\nIn the meantime, I would like to recommend Michael Goddard's [hard-source-webpack-plugin](https://github.com/mzgoddard/hard-source-webpack-plugin), \u003cbr\u003e\nwhich seems like webpack 5 is going to use internally.\n\n\n\u003chr\u003e\n\n\n# AutoDllPlugin\nWebpack's DllPlugin without the boilerplate\n\nwebpack 4\n```\n  npm install --save-dev autodll-webpack-plugin\n```\n\nwebpack 2 / 3\n```\n  npm install --save-dev autodll-webpack-plugin@0.3\n```\n\n\n---\n\n## Table of contents\n\n- [Introduction](#introduction)\n- [Options](#options)\n- [FAQ](#faq)\n- [Examples](#running-examples)\n\n\n## Introduction\n\nWebpack's own DllPlugin it great, it can drastically reduce the amount of time needed to build (and rebuild) your bundles by reducing the amount of work needs to be done.\n\nIf you think about it, most of the code in your bundles come from NPM modules that you're rarely going to touch. You know that, but Webpack doesn't. So every time it compiles it has to analyze and build them too - and that takes time.\n\nThe DllPlugin allows you to to create a separate bundle in advance for all of those modules, and teach Webpack to reference them to that bundle instead.\n\nThat leads to a dramatic reduction in the amount of time takes Webpack to build your bundles.\n\nFor example, these are the measurements for the  [performance test](examples/performance) that you can find in the [examples](examples) folder:\n\n|                   |  **Without DllPlugin**  | **With DllPlugin** |\n|-------------------|-------------------|-----------------------|\n| **Build Time** | 16461ms - 17310ms | 2991ms - 3505ms |\n| **DevServer Rebuild** | 2924ms - 2997ms | 316ms - 369ms |\n\n\n\n### The DllPlugin sounds great! So why AutoDllPlugin?\n\nWhile the DllPlugin has many advantages, it's main drawback is that it requires a lot of boilerplate.\n\nAutoDllPlugin serves as a high-level plugin for both the DllPlugin and the DllReferencePlugin, and hides away most of their complexity.\n\nWhen you build your bundle for the first time, the AutoDllPlugin Compiles the DLL for you, and references all the specified modules from your bundle to the DLL.\n\nThe next time you compile your code, AutoDllPlugin will skip the build and read from the cache instead.\n\nAutoDllPlugin will rebuild your DLLs every time you change the Plugin's configuration, install or remove a node module.\n\nWhen using Webpack's Dev Server, the bundle are loaded into the memory preventing unnecessary reads from the FileSystem.\n\nWith the way the DLLPlugin works, you must load the DLL bundles before your own bundle. This is commonly accomplished by adding an additional script tag to the HTML.\n\nBecause that is such a common task, AutoDllPlugin can do this for you (in conjunction with the HtmlPlugin ).\n\n```js\nplugins: [\n  new HtmlWebpackPlugin({\n    inject: true,\n    template: './src/index.html',\n  }),\n  new AutoDllPlugin({\n    inject: true, // will inject the DLL bundles to index.html\n    filename: '[name].js',\n    entry: {\n      vendor: [\n        'react',\n        'react-dom'\n      ]\n    }\n  })\n]\n```\n\nWill Result in:\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n\u003chead\u003e\n  \u003cmeta charset=\"UTF-8\"\u003e\n  \u003ctitle\u003eTest\u003c/title\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n\n  ...\n\n  \u003cscript src=\"dist/vendor.dll.js\"\u003e\u003c/script\u003e\n  \u003cscript src=\"dist/main.bundle.js\"\u003e\u003c/script\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n\n### Basic Usage ([example](examples/basic)):\n\n```js\nconst path = require('path');\nconst AutoDllPlugin = require('autodll-webpack-plugin');\n\nmodule.exports = {\n  entry: {\n    app: './src/index.js'\n  },\n\n  output: {\n    filename: '[name].bundle.js',\n    path: path.resolve(__dirname, 'dist')\n    publicPath: '/'\n  },\n\n  plugins: [\n    new AutoDllPlugin({\n      filename: '[name].dll.js',\n      entry: {\n        vendor: [\n          'react',\n          'react-dom'\n        ]\n      }\n    })\n  ]\n};\n```\n\n### Recommended Usage ([example](examples/recommended)):\n\nWhile it's not required, using AutoDllPlugin together with [HtmlWebpackPlugin](https://github.com/jantimon/html-webpack-plugin) is highly recommended, because its saves you the trouble of manually adding the DLL bundles to the HTML by yourself.\n\nUse AutoDllPlugin's `inject` option to enable this feature.\n\n```js\nconst path = require('path');\nconst AutoDllPlugin = require('autodll-webpack-plugin');\nconst HtmlWebpackPlugin = require('html-webpack-plugin');\n\nmodule.exports = {\n  entry: './src/index.js',\n\n  output: {\n    filename: '[name].bundle.js',\n    path: path.resolve(__dirname, 'dist'),\n    publicPath: '/'\n  },\n\n  plugins: [\n    new HtmlWebpackPlugin({\n      inject: true, // will inject the main bundle to index.html\n      template: './src/index.html',\n    }),\n    new AutoDllPlugin({\n      inject: true, // will inject the DLL bundle to index.html\n      debug: true,\n      filename: '[name]_[hash].js',\n      path: './dll',\n      entry: {\n        vendor: [\n          'react',\n          'react-dom'\n        ]\n      }\n    })\n  ]\n};\n```\n\n## Options\n\n\u003ctable\u003e\n    \u003cthead\u003e\n        \u003ctr\u003e\n            \u003cth\u003eOption\u003c/th\u003e\n            \u003cth\u003eType\u003c/th\u003e\n            \u003cth\u003eDefault\u003c/th\u003e\n            \u003cth\u003eDescription\u003c/th\u003e\n        \u003c/tr\u003e\n    \u003c/thead\u003e\n    \u003ctbody\u003e\n        \u003ctr\u003e\n            \u003ctd\u003eentry\u003c/td\u003e\n            \u003ctd\u003eObject\u003c/td\u003e\n            \u003ctd\u003e\u003ccode\u003e{}\u003c/code\u003e\u003c/td\u003e\n            \u003ctd\u003e\n              \u003cp\u003e\n                The entry points for the DLL's. \u003cbr\u003e\n                Think of it as the entry option in your webpack config. \u003cbr\u003e\n                Each entry point represents a DLL bundle and expects an array of modules.\n              \u003c/p\u003e\n\u003cpre\u003eentry: {\n    // Create a DLL from NPM modules:\n    vendor: [\n      'react',\n      'react-dom',\n      'moment',\n      'lodash'\n    ],\n    // Create a DLL from a part of your app\n    // that you rarely change:\n    admin: [\n        './src/admin/index.js'\n    ]\n}\u003c/pre\u003e\n            \u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n            \u003ctd\u003efilename\u003c/td\u003e\n            \u003ctd\u003eString\u003c/td\u003e\n            \u003ctd\u003e\u003ccode\u003e\"[name].js\"\u003c/code\u003e\u003c/td\u003e\n            \u003ctd\u003e\n              \u003cp\u003eThe filename template. \u003cbr\u003e Same as webpack's\n                \u003ca href=\"https://webpack.js.org/configuration/output/#output-filename\"\u003eoutput.filename\u003c/a\u003e.\n              \u003c/p\u003e\n              \u003cp\u003eExamples:\u003c/p\u003e\n              \u003cul\u003e\n                \u003cli\u003e\u003ccode\u003e[name]_[hash].dll.js\u003c/code\u003e\u003c/li\u003e\n                \u003cli\u003e\u003ccode\u003e[id].bundle.js\u003c/code\u003e\u003c/li\u003e\n              \u003c/ul\u003e\n            \u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n            \u003ctd\u003econtext\u003c/td\u003e\n            \u003ctd\u003eString\u003c/td\u003e\n            \u003ctd\u003e\u003ccode\u003eprocess.cwd()\u003c/code\u003e\u003c/td\u003e\n            \u003ctd\u003e\n              \u003cp\u003e\n                The base directory, an \u003cstrong\u003eabsolute path\u003c/strong\u003e, for resolving entry points and loaders from the configuration.\n              \u003c/p\u003e\n              \u003cp\u003e\n                Same as webpack's \u003ca href=\"https://webpack.js.org/configuration/entry-context/#context\"\u003econtext\u003c/a\u003e\n              \u003c/p\u003e\n              \u003cp\u003e\n                \u003cb\u003eIt is very important to make sure the context is set correctly\u003c/b\u003e, \u003cbr\u003e\n                otherwise, you'll end up with having the same modules both in the DLL bundles and in your main bundles!\n              \u003c/p\u003e\n              \u003cp\u003eMost of the time, the defaults (the current directory) should work for you, here's how it should work:\u003c/p\u003e\n              \u003cp\u003eIf your webpack config is stored at the base of your project:\u003c/p\u003e\n              \u003cp\u003e\u003ci\u003e~/my-project/webpack.config.js\u003c/i\u003e\u003c/p\u003e\n              \u003cp\u003eSet it up like this:\u003c/p\u003e\n\u003cpre\u003e\n{\n  context: __dirname\n}\n\u003c/pre\u003e\n\n\u003cp\u003eIf your webpack config is stored in a nested directory:\u003c/p\u003e\n\u003cp\u003e\u003ci\u003e~/my-project/\u003cb\u003econfig\u003c/b\u003e/webpack.config.js\u003c/i\u003e\u003c/p\u003e\n\u003cp\u003eIt should look like this:\u003c/p\u003e\n\u003cpre\u003e\n{\n  context: path.join(__dirname, '..')\n}\n\u003c/pre\u003e\n          \u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n            \u003ctd\u003einject\u003c/td\u003e\n            \u003ctd\u003eBoolean\u003c/td\u003e\n            \u003ctd\u003e\u003ccode\u003efalse\u003c/code\u003e\u003c/td\u003e\n            \u003ctd\u003e\n              \u003cp\u003eBy setting inject to true, AutoDLL will inject the DLL bundles into the HTML for you.\u003c/p\u003e\n              \u003cp\u003e\n                \u003cb\u003eNote:\u003c/b\u003e \u003ca href=\"https://github.com/jantimon/html-webpack-plugin\"\u003eHtmlWebpackPlugin\u003c/a\u003e\n                is required for this feature to work.\n              \u003c/p\u003e\n            \u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n            \u003ctd\u003epath\u003c/td\u003e\n            \u003ctd\u003eString\u003c/td\u003e\n            \u003ctd\u003e\u003ccode\u003e\"\"\u003c/code\u003e\u003c/td\u003e\n            \u003ctd\u003e\n                The path for the DLL bundles, relative to webpack's\n                \u003ca href=\"https://webpack.js.org/configuration/output/#output-publicpath\"\u003eoutput.publicPath\u003c/a\u003e\n            \u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n            \u003ctd\u003edebug\u003c/td\u003e\n            \u003ctd\u003eBoolean\u003c/td\u003e\n            \u003ctd\u003e\u003ccode\u003efalse\u003c/code\u003e\u003c/td\u003e\n            \u003ctd\u003eUse debug mode to see more clearly what AutoDLL is doing.\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n            \u003ctd\u003eplugins\u003c/td\u003e\n            \u003ctd\u003eArray\u003c/td\u003e\n            \u003ctd\u003e\u003ccode\u003e[]\u003c/code\u003e\u003c/td\u003e\n            \u003ctd\u003e\n              \u003cp\u003e\n                Plugins for the DLL compiler. Same as webpack's\n                \u003ca href=\"https://webpack.js.org/configuration/plugins/\"\u003eplugins\u003c/a\u003e.\n              \u003c/p\u003e\n              \u003cpre\u003eplugins: [\n  new webpack.optimize.UglifyJsPlugin()\n]\u003c/pre\u003e\n            \u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n          \u003ctd\u003einherit\u003c/td\u003e\n          \u003ctd\u003eBoolean/Function\u003c/td\u003e\n          \u003ctd\u003e\u003ccode\u003efalse\u003c/code\u003e\u003c/td\u003e\n          \u003ctd\u003e\n            Inherit from the parent config.\n            A valid use-case would be if you have \u003ccode\u003edevtool: \"source-maps\"\u003c/code\u003e in your webpack config and wanted source maps to be created for the DLL bundle as well.\n            However, this \u003cstrong\u003edoes not\u003c/strong\u003e inherit plugins from the parent config and inheriting loaders are buggy too(see \u003ca href=\"https://github.com/asfktz/autodll-webpack-plugin/issues/37\"\u003e#37\u003c/a\u003e).\n            It can also be a function to inherit only the desired properties.\n            \u003cpre\u003efunction inherit(webpackConfig) {\n  // Return object with desired properties.\n}\n\u003c/pre\u003e\n            To see it action, \u003ca href=\"https://github.com/asfktz/autodll-webpack-plugin/tree/master/experiments/inherit\"\u003echeck out the example\u003c/a\u003e.\n            \u003cbr\u003e\n            \u003cstrong\u003e⚠️ This option is highly experimental! Use with caution and if you face any problems, please open a issue.\u003cstrong\u003e\n          \u003c/td\u003e\n        \u003c/tr\u003e\n    \u003c/tbody\u003e\n\u003c/table\u003e\n\n## FAQ\n\n### I added my dependencies to the DLL, and now, when I make a change to one of them I don't see it! Why?\n\nWhen you run webpack for the first time, AutoDLL builds the DLL bundles and stores them in the cache for next time.\n\nThat leads to faster builds and rebuilds (using webpack's dev server).\n\nThere are two conditions for triggering a new build on the next run:\n1. Running `npm install / remove / update package-name` (or Yarn equivalent).\n2. Changing the plugin's configurations.\n\nFor performance considerations, AutoDLL is not aware of any changes made to module's files themselves.\n\nSo as long as you intend to work on a module, just exclude it from the DLL.\n\nFor example, let's say you configured the plugin like so:\n\n```js\nnew AutoDllPlugin({\n  entry: {\n    vendor: [\n      'react',\n      'react-dom',\n      'lodash'\n    ]\n  }\n})\n```\n\nAnd then, while working on your project, you encountered some weird behavior with `lodash` and decided to put a `console.log` statement in one of its files to see how it behaves.\n\nAs explained above, AutoDLL is not going to invalidate its cache in this case, and you might get surprised that you don't see the changes.\n\nTo fix that, all you have to do is comment out `lodash` from the DLL, and uncomment it when you're done.\n\n```js\nnew AutoDllPlugin({\n  entry: {\n    vendor: [\n      'react',\n      'react-dom'\n     // 'lodash'\n    ]\n  }\n})\n```\n\n\n### The modules I added to the DLL are duplicated! They included both in the DLL bundle AND the main bundle.\n\nThat is most likely caused by using an incorrect context.\n\nAutoDLL will try its best to set the context for you, but as with [webpack's own context](https://webpack.js.org/configuration/entry-context/#context) property, sometimes it is better to do it manually.\n\nThe context property should be an absolute path, pointing the base of your project.\n\nFor example, let's consider a project structured like so:\n\n```\nmy-project\n├── node_modules\n│   └── react\n│   └── react-dom\n├── src\n│   └── index.js\n│   └── module.js\n├── webpack.config.js\n└── package.json\n```\n\nThen, inside `webpack.config.js`, You'll setup the context like so:\n\n```js\n__dirname;   // '/Users/username/my-project'\n\n...\n\nnew AutoDllPlugin({\n  context: __dirname,\n  entry: {\n    vendor: [\n      'react',\n      'react-dom'\n    ]\n  }\n})\n```\n\nNote that the `__dirname` variable is [node's way](https://nodejs.org/docs/latest/api/globals.html#globals_dirname) to get the absolute path of the current module's directly, which is exactly what we need because webpack.config.js stored in the base of our project.\n\nOn the other hand, let's say your project is structured like so:\n\n```\nmy-project\n├── node_modules\n│   └── react\n│   └── react-dom\n├── src\n│   └── index.js\n│   └── module.js\n├── config\n│   └── webpack.config.js\n└── package.json\n```\n\nNotice that now our config is no longer stored at the base of our project, but in a subdirectory of its own. \u003cbr\u003e\nThat means that now we have to subtract the relative path to our config file from `__dirname`.\n\nWe can use [node's path module](https://nodejs.org/docs/latest/api/path.html) to help us with that:\n\n```js\nvar path = require('path');\n\n__dirname;                   // '/Users/username/my-project/config'\npath.join(__dirname, '..');  // '/Users/username/my-project'\n\n...\n\nnew AutoDllPlugin({\n  context: path.join(__dirname, '..'),\n  entry: {\n    vendor: [\n      'react',\n      'react-dom'\n    ]\n  }\n})\n```\n\nIf you still encounter an issue with the context set up correctly, please open an issue. I'll be happy to help you.\n\n## Running Examples\n\n1. `git clone git@github.com:asfktz/autodll-webpack-plugin.git`\n2. `cd autodll-webpack-plugin`\n3. `npm install`\n4. `npm run build`\n5. `cd examples/recommended`\n6. `npm install`\n7. `npm start` or `npm run build`\n\n## Contributors\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore --\u003e\n| [\u003cimg src=\"https://avatars1.githubusercontent.com/u/199747?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAsaf Katz\u003c/b\u003e\u003c/sub\u003e](https://twitter.com/asfktz)\u003cbr /\u003e[💻](https://github.com/asfktz/autodll-webpack-plugin/commits?author=asfktz \"Code\") [👀](#review-asfktz \"Reviewed Pull Requests\") [⚠️](https://github.com/asfktz/autodll-webpack-plugin/commits?author=asfktz \"Tests\") [🚇](#infra-asfktz \"Infrastructure (Hosting, Build-Tools, etc)\") | [\u003cimg src=\"https://avatars2.githubusercontent.com/u/22251956?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eSuhas Karanth\u003c/b\u003e\u003c/sub\u003e](https://github.com/sudo-suhas)\u003cbr /\u003e[💻](https://github.com/asfktz/autodll-webpack-plugin/commits?author=sudo-suhas \"Code\") [🤔](#ideas-sudo-suhas \"Ideas, Planning, \u0026 Feedback\") [🐛](https://github.com/asfktz/autodll-webpack-plugin/issues?q=author%3Asudo-suhas \"Bug reports\") [🚇](#infra-sudo-suhas \"Infrastructure (Hosting, Build-Tools, etc)\") [⚠️](https://github.com/asfktz/autodll-webpack-plugin/commits?author=sudo-suhas \"Tests\") [🔧](#tool-sudo-suhas \"Tools\") [💬](#question-sudo-suhas \"Answering Questions\") | [\u003cimg src=\"https://avatars1.githubusercontent.com/u/17503914?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMatt Heise\u003c/b\u003e\u003c/sub\u003e](https://github.com/mhheise)\u003cbr /\u003e[💻](https://github.com/asfktz/autodll-webpack-plugin/commits?author=mhheise \"Code\") | [\u003cimg src=\"https://avatars0.githubusercontent.com/u/154732?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eJames Gillmore\u003c/b\u003e\u003c/sub\u003e](http://twitter.com/faceyspacey)\u003cbr /\u003e[💻](https://github.com/asfktz/autodll-webpack-plugin/commits?author=faceyspacey \"Code\") | [\u003cimg src=\"https://avatars1.githubusercontent.com/u/583657?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eJonas Pauthier\u003c/b\u003e\u003c/sub\u003e](https://twitter.com/jonas_pauthier)\u003cbr /\u003e[🤔](#ideas-Nargonath \"Ideas, Planning, \u0026 Feedback\") [🔧](#tool-Nargonath \"Tools\") [💬](#question-Nargonath \"Answering Questions\") [📖](https://github.com/asfktz/autodll-webpack-plugin/commits?author=Nargonath \"Documentation\") [🐛](https://github.com/asfktz/autodll-webpack-plugin/issues?q=author%3ANargonath \"Bug reports\") | [\u003cimg src=\"https://avatars1.githubusercontent.com/u/9636410?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAde Viankakrisna Fadlil\u003c/b\u003e\u003c/sub\u003e](https://github.com/viankakrisna)\u003cbr /\u003e[💻](https://github.com/asfktz/autodll-webpack-plugin/commits?author=viankakrisna \"Code\") [🐛](https://github.com/asfktz/autodll-webpack-plugin/issues?q=author%3Aviankakrisna \"Bug reports\") [🔧](#tool-viankakrisna \"Tools\") [💬](#question-viankakrisna \"Answering Questions\") | [\u003cimg src=\"https://avatars2.githubusercontent.com/u/2373958?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eTryggvi Gylfason\u003c/b\u003e\u003c/sub\u003e](https://github.com/tryggvigy)\u003cbr /\u003e[💻](https://github.com/asfktz/autodll-webpack-plugin/commits?author=tryggvigy \"Code\") [💬](#question-tryggvigy \"Answering Questions\") [🐛](https://github.com/asfktz/autodll-webpack-plugin/issues?q=author%3Atryggvigy \"Bug reports\") |\n| :---: | :---: | :---: | :---: | :---: | :---: | :---: |\n| [\u003cimg src=\"https://avatars1.githubusercontent.com/u/1056587?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eDrew Hamlett\u003c/b\u003e\u003c/sub\u003e](https://github.com/drewhamlett)\u003cbr /\u003e[💻](https://github.com/asfktz/autodll-webpack-plugin/commits?author=drewhamlett \"Code\") | [\u003cimg src=\"https://avatars1.githubusercontent.com/u/8420490?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eJoshua Wiens\u003c/b\u003e\u003c/sub\u003e](https://github.com/d3viant0ne)\u003cbr /\u003e[📖](https://github.com/asfktz/autodll-webpack-plugin/commits?author=d3viant0ne \"Documentation\") [💬](#question-d3viant0ne \"Answering Questions\") | [\u003cimg src=\"https://avatars2.githubusercontent.com/u/231804?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eDaniel Tschinder\u003c/b\u003e\u003c/sub\u003e](https://github.com/danez)\u003cbr /\u003e[💻](https://github.com/asfktz/autodll-webpack-plugin/commits?author=danez \"Code\") | [\u003cimg src=\"https://avatars1.githubusercontent.com/u/6374832?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAmila Welihinda\u003c/b\u003e\u003c/sub\u003e](http://amilajack.com)\u003cbr /\u003e[📖](https://github.com/asfktz/autodll-webpack-plugin/commits?author=amilajack \"Documentation\") |\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\nThis project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!\n\nSpecial thanks to all the contributors over the time.\nEvery one of you made an impact ❤️\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasfktz%2Fautodll-webpack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasfktz%2Fautodll-webpack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasfktz%2Fautodll-webpack-plugin/lists"}