alephjs/aleph.js

Is it possible to ignore css module expression like `import "//cdn.com/external.css"` for SSR?

ahuigo opened this issue · 2 comments

What I mean is that, is it possible to skip this import "cdn/external.css" expression at hydrate server side?

Since this expression can only be used at browser side.

image

try <link /> in <Head />:

import { Head } from "aleph/react";
export default function Index() {
  // ...
  return (
    <div>
      <Head>
        <title>Monaco Editor</title>
        <link
          rel="stylesheet"
          href="https://esm.sh/v78/monaco-editor@0.33.0/esnext/monaco-editor.css"
        />
      </Head>
      <div ref={editorRef}>
        <span style={{ color: "darkgray" }}>loading...</span>
      </div>
    </div>
  );
}

@ddosakura It's not a good way for external package.
Maybe, we should wait Deno to support it.
denoland/deno#11961