title: How to integrate OpenCV.js in a React WebApp?
body: <p>I'm new to Javascript and React. I would like to embed OpenCV.js into a basic React.js web app to build an online client-side document scanner (I already have the image processing pipeline developped in Python).</p>
  
  <p>I used <code>yarn create react-app</code> to get a basic working React sandbox containing : <code>App.js</code> which is the main React component and <code>index.js</code> which plugs it into the DOM. I added a custom <code>imageProcessing.js</code> file that will contain my image processing pipeline. A <code>yarn start</code> command is available to compile everything and display the result in my browser.</p>
  
  <p>In order to use OpenCV in this pipeline, I downloaded <code>opencv.js</code> from <a href="https://docs.opencv.org/master/opencv.js" rel="noreferrer">official page</a>, put it next to <code>imageProcessing.js</code> and finally called it through <code>const cv = require('../lib/opencv')</code>.
  The problem is the <code>yarn start</code> command compiles sources for hours and it is clearly not possible to develop anything.</p>
  
  <p>Now my question is : how to efficiently compile my web app with that heavy <code>opencv.js</code> (13MB) in my sources ? 
  Is their a better way of integrating the lib ? </p>
  
  <p>Thanks for your help !</p>