title: Trouble getting Next.js to work with aws-amplify
body: <p>It does not seem that Next.js is able to read the required css file in node_modules.</p>
  
  <p>Error:</p>
  
  <pre><code>./node_modules/@aws-amplify/ui/dist/style.css 13:0
  Module parse failed: Unexpected token (13:0)
  You may need an appropriate loader to handle this file type.
  |  * and limitations under the License.
  |  */
  &gt; :root {
  | 
  |   /* Colors */
  </code></pre>
  
  <p>Links that provide potential solutions:</p>
  
  <p><a href="https://github.com/aws-amplify/amplify-js/issues/1535" rel="nofollow noreferrer">https://github.com/aws-amplify/amplify-js/issues/1535</a></p>
  
  <p><a href="https://github.com/aws-amplify/amplify-js/issues/2230" rel="nofollow noreferrer">https://github.com/aws-amplify/amplify-js/issues/2230</a></p>
  
  <p><a href="https://github.com/zeit/next-plugins/issues/267" rel="nofollow noreferrer">https://github.com/zeit/next-plugins/issues/267</a></p>
  
  <p>The proposed solution is to put this at the top of a next.config.js file:</p>
  
  <pre><code>if (typeof require !== "undefined") {
   require.extensions[".less"] = () =&gt; {};
   require.extensions[".css"] = (file) =&gt; {};
  }
  </code></pre>
  
  <p>I have not been able to get this proposed fix to work, and am wondering if anybody has a greater understanding of the actual issue/setting up a next.config.js file with the proposed solution.</p>
  
  <p>Thanks in advance.</p>