Fixing 'define' is not defined no-undef in react create app third party imports : <p>i have imported momentjs in my react app, after importing react create app is throwing following error restricting the build</p>

<blockquote>
  <p>./src/shared_components/quiz-player/node_modules/moment/moment.js<br>
  Line 9:  'define' is not defined  no-undef</p>
</blockquote>

<p>when i investigate the issue it is thrown from following line</p>

<pre><code>typeof define === 'function' &amp;&amp; define.amd ? define(factory) :
global.moment = factory()
</code></pre>

<p>this is due to amd module definition and since this is a third party library i have no option of resolving the issue, is there any thing that can be done to tell the webpack config to expect amd module definition or some other fix for this? </p>
