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