I recently started working with next js.
In my _app.tsx
page, I have the following code:
import '../styles/antd.css'
import '../styles/globals.css'
import type { AppProps } from 'next/app'
function MyApp({ Component, pageProps }: AppProps) {
return (
<>
<Component {...pageProps} />
</>
)
}
export default MyApp
The issue I am facing is that the styles - import '../styles/antd.css'
are being loaded as an external request during production run at
/_next/static/css/fffc165f54adb267.css
. This results in a one second lag during the styles loading. Is there a better way to load styles in my base page without making external requests for styles?