title: Error : Only absolute URLs are supported in nextjs
body: <p>can you please help me to resolve a error <strong>Only absolute URLs are supported in nextjs</strong> .I am trying to fetch data from server</p>
  <pre><code>export async function getStaticProps({
    params,
    preview = false,
    previewData = {}
  }) {
    console.log(&quot;-----&quot;);
    const res = await fetch(&quot;/api/basecss/&quot;);
    const stylesheet = await res.text(); // Converts response data to text
    return {
      revalidate: 200,
      props: {
        stylesheet
      }
    };
  }
  </code></pre>
  <p>here is my code
  <a href="https://codesandbox.io/s/naughty-platform-1xket?file=/pages/index.js:332-639" rel="nofollow noreferrer">https://codesandbox.io/s/naughty-platform-1xket?file=/pages/index.js:332-639</a></p>
  <p>I am getting this error
  <strong>TypeError: Only absolute URLs are supported</strong></p>