I’m trying to build an extension that utilizes an existing React component from another project. Right now I’m just building and minifying that component into a separate .js file, and inserting the DOM in ReactWidget.onAfterAttach()
. That works, but I’m thinking that is not as efficient as importing the react component itself in typescript.
The problem is that this project uses .js files for the react components, and webpack doesn’t recognize them as .jsx. files and throws a syntax error. I’m not too experienced with React, but I can hack my way around a project. Is there a way to make this work so that I can import the project as a dependency and import the react component?