Requirements for My Plugin:
I'm currently in the process of developing a new plugin that is dependent on popularLibrary.js
. Here are the key points about my plugin:
- It will not function properly if
popularLibrary.js
is missing. - It is designed to work specifically with version
v1.x.x
ofpopularLibrary.js
. - My plugin must be able to operate seamlessly when included as a dependency in a project that utilizes
popularLibrary.js
. - Similarly, it should also work effectively when packaged alongside
popularLibrary.js
.
For example purposes, consider the following setup:
<script src="https://some-cdn.com/popularLibrary.js"></script>
<script src="https://some-cdn.com/myMagicalPlugin.js"></script>
Challenges I Am Facing:
- I have encountered difficulties when specifying
popularLibrary.js
as apeerDependency
, as it no longer gets downloaded during thenpm install
process. How can I continue the development of my plugin, which relies on importing and utilizing features provided bypopularLibrary.js
? - Considering that not all users incorporate a build step into their workflow, what happens if someone manually includes minified sources for both
popularLibrary.js
andmyMagicalPlugin.js
? How does thepeerDependency
resolution take place in this scenario? Are there any additional steps or modifications required in either library to account for this situation?