Webpack repeat Packaging

this is my project directory

node_modules
buildScripts
  | - webpack.dll.config.js
  | - webpack.development.config.js
src
  | - components
        |-  index.js
packages
  | mypackage1
    | - node_modules
    | -  dist
        | - index.js 
    | -  index.js
    | - package.json
package.json

the code of the application is written in src , and some packages are also developed and put into packages.
now src uses packages developed in packages. Since the packages in packages have not been released, npm link is used for src to use.
mypackage1 and src both use react
project using Webpack.DllReference, to package third-party libraries (including mypackage1)
package results. Webpack packages react under mypackage1/node_modules/ and react under node_modules/ .
later found that if you delete mypackage1/node_modules , it will not be packaged

.

the question is, how to prevent webpack from packaging repeatedly without deleting mypackage1/node_modules ?

Mar.16,2021
Set resolve.modules, in

webpack.dll.config.js to specify the module scan directory


add the alias of the package through resolve.alias and forcibly specify a unified path to reference https://blog.csdn.net/u010352.

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3777c-2b813.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3777c-2b813.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?