I'm fetching data from API call in _document.js , and based on data putting condition to include CSS using Link tag. I was trying to include CSS file from public/static/ folder in _document.js or layout.js file, but not working. layout.js file import React from 'react'; import Head from 'next/head' ... <Head> <link rel="stylesheet" href="public/static/ed_style.css" /> </Head> ...
Originally asked by Namdev on Stack Exchange (stackoverflow) (CC BY-SA 4.0).