Open beilo opened 5 years ago
This article may answer you: http://www.programmersought.com/article/1319630786/
@g8up Thank you very much for your answer. The method of this article is correct
But we hope that autodll webpack plugin
can provide this function
Or is it correct to generate only one DLL?
I am using the
autodll-webpack-plugin
procedure and found that if multiple dll packages are generated, it will cause duplicate references.After analyzing with
webpack-bundle-analyzer
, it was found thatreact-dom
was repeated, as shown below:chunks:all
After analysis, there is only one
react-dom
, as shown below:Use
AutoDllPlugin
to get the following result:Ps1:
dll
file usingwebpack-bundle-analyzer
vendor_libs
is similar in size to thechunks:all
package, and even larger.Ps2:
dll
does not actually need to distinguish between multiple packagesdll
myself, but afterchunk:all
, an exception will occur, making it unusable.Can you answer my doubts? Thank you.