In my Next 10 application, I can import global styles in _app.js
like so
import 'assets/css/app.css'
I'd like to add a print stylesheet. I know I can use a @media print { }
query to app.css
, but ideally it would be loaded as a separate file so the download priority is lower, e.g.
<link rel="stylesheet" href="/assets/css/print.css" media="print">
Is this possible using Next.js? I can't see any obvious way to control how the actual <link>
tag is rendered.
The only way I can see this might work is to have a custom bit of Webpack/file-loader configuration that matches print.css
only, which feels... less than ideal.