Hi,
I'm trying to create a code component that will be a wrapper around a 3rd. party JavaScript based HTML component. I need to include the JavaScript file, plus all files it needs, into my PCF solution to be deployed as one package. I'm trying to load the .js file as follows in my index.ts file:
let scriptNode = document.createElement("script");
scriptNode.setAttribute("type", "text/javascript");
scriptNode.setAttribute("src", "folder/component.js");
scriptNode.onload = () => { ... };
document.head.appendChild(scriptNode);
This approach works fine if the component is in a CDN somewhere that I can point to using a full URL, but I need it to work "locally". Maybe I need to mess with the ControlManifest.input.xml file?
Hope this is clear. Thanks for any help.