I am looking for a solution to include a third-party library in a JavaScript file that will be downloaded to our project only when we visit a specific page. This library is installed with npm and I want it to be part of the js package without including it in the entire project. Can anyone suggest how I can create a js package that includes all dependencies, including this third-party library? I have been searching all day but I haven't found a solution yet.
What assistance is available for building a JavaScript package that integrates and utilizes all necessary dependencies?
I am looking for a solution to include a third-party library in a JavaScript file that will be downloaded to our project only when we visit a specific page. This library is installed with npm and I want it to be part of the js package without including it in the entire project. Can anyone suggest how I can create a js package that includes all dependencies, including this third-party library? I have been searching all day but I haven't found a solution yet.