refactor(markdown): Make module CLI-importable
Drop the mermaid import from the markdown module. The extension only emits <pre class="mermaid">, so initialize mermaid in the app entry instead. Use explicit .js specifiers plus a bundler extensionAlias so both the NodeNext CLI build and the web build resolve the sources.
This commit is contained in:
@@ -1,8 +1,13 @@
|
||||
import { render } from "solid-js/web";
|
||||
import { Router, Route } from "@solidjs/router";
|
||||
import mermaid from "mermaid";
|
||||
import App from "./App";
|
||||
import "./styles.css";
|
||||
|
||||
// Mermaid is a runtime concern; the markdown module only emits
|
||||
// <pre class="mermaid"> placeholders. Initialize before any `mermaid.run()`.
|
||||
mermaid.initialize({ theme: "dark" });
|
||||
|
||||
const root = document.getElementById("root");
|
||||
|
||||
if (root) {
|
||||
|
||||
Reference in New Issue
Block a user