How does the packaged npm component module extract the common library so that other installers of this component use their own common library?

now it"s time to package a library, which uses jquery

.

the goal is that
jquery is not packaged into a. After other projects install library a, install jquery (or have their own) when installing dependencies, and run-time a can use the project"s jquery library

.
Mar.04,2021

write it in the externals attribute array in the webpack configuration


official English document
if English is not good, You can refer to the following two articles:
webpack's in-depth understanding of externals
webpack externals

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-1ea705f-5cc3e.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-1ea705f-5cc3e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?