2

There are a lot of articles which point to using DllPlugin for reducing build times. Can this be used in production, since webpack has an open issue with vendor chunk content hash not being consistent? I was planning to use DllPlugin to overcome this issue, so as to leverage browser caching.

guru107
  • 1,053
  • 1
  • 11
  • 28

2 Answers2

1

Now we can set DllPlugin entryOnly config to use tree-shaking https://webpack.js.org/plugins/dll-plugin/
https://fossies.org/linux/webpack/examples/dll-entry-only/README.md

Alex
  • 11
  • 2
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Feb 10 '23 at 08:39
0

There's nothing that prevents you from using it in production, but keep in mind it won't support tree-shaking.

Seivan
  • 668
  • 6
  • 13
  • Despite the documentation, it is true. If you are using DllPlugin to create vendor bundle directly from list of dependencies, you can't tree shake it. There is no way it could work, because the dll plugin by definition won't update when application code changes. – raine Oct 07 '21 at 16:13