In my current project, known as "ProjectMain," I am also working on another project that will act as an extension to ProjectMain - let's call it "MyComponent."
My intention is to create MyComponent as a standalone library. My main question is: can I bring in MyComponent into the ProjectMain application dynamically without making any changes to the existing MainProject code? Essentially, I want to load MyComponent dynamically.
If I were to load the JavaScript within the Document Object Model (DOM), I should be able to utilize it. Here's an illustration of what I have in mind:
<html>
<head>
<script type=“text/javascript” src=“my-component.js”></script>
//if this loaded then i will load the component in the ProjectMain.
</head>
<body>
<div id="app"></div>
</body>
</html>