Configuring Cypress, cypress-react-unit-test, and React : <p>I want to test our React components independently using the package <code>cypress-react-unit-test</code>. After several days, I have been unable to get it to work with the existing React Webpack configuration.
I get the error: <code>TypeError: path argument is required to res.sendFile</code> when I open the file through Cypress' window.</p>

<p>I am using the file from their example repo for testing: 
<a href="https://github.com/cypress-io/cypress-example-recipes/blob/master/examples/unit-testing__react/greeting.jsx" rel="noreferrer">https://github.com/cypress-io/cypress-example-recipes/blob/master/examples/unit-testing__react/greeting.jsx</a></p>

<p>We do use TypeScript, but I wanted to get this working first.</p>

<p>I have tried overwriting <code>path</code> as it is defaulting to <code>undefined</code>, but I'm getting the same error.</p>

<pre><code>{
  options: {
    path: "/my/home/dir/"
  }
}
</code></pre>

<p>In my <code>cypress/plugins/index.js</code> file I have:</p>

<pre><code>const wp = require("@cypress/webpack-preprocessor");

const webpackConfig = require("../../node_modules/react-scripts/config/webpack.config")("development");

module.exports = on =&gt; {
  const options = {
    webpackOptions: webpackConfig
  };

  on("file:preprocessor", wp(options));
};
</code></pre>

<p>I'm obviously missing something, but I don't know Webpack well enough. I would be grateful for any pointers! Thanks!</p>
