title: How to conditionally import a SCSS stylesheet in Next.js?
body: <p>I'm trying to load a stylesheet depending on the environment, in <code>_app.js</code>:</p>
  <pre><code>if (process.env.NODE_ENV === 'production' ) {
    import '../styles/globals-production.scss'
  } else {
    import '../styles/globals-staging.scss'
  }
  </code></pre>
  <p>But getting this error in the console: <code>Syntax error: 'import' and 'export' may only appear at the top level</code></p>
  <p>Any ideas on how I can do this with Next.js?</p>