Conversation
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f034b86446
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const mermaidPath = path.join(process.cwd(), 'public/app/common/mermaid/mermaid.min.js'); | ||
|
|
||
| if (!fs.existsSync(mermaidPath)) { | ||
| throw new Error(`Mermaid script not found at: ${mermaidPath}`); | ||
| } |
There was a problem hiding this comment.
Resolve mermaid script relative to package, not cwd
The new loader builds the mermaid path from process.cwd() (lines 84–88), which only works when the CLI is invoked from the repo root. If a user runs elp:export from another working directory (common for CLI use or packaged installs), public/app/common/mermaid/mermaid.min.js won’t exist, initialization fails, and preRenderMermaid falls back to mermaidRendered: false; exports then omit the Mermaid runtime entirely (see the export constants noting Mermaid is never bundled), leaving diagrams unrendered in output. Consider resolving the script path relative to the module/package root (e.g., via import.meta.url/__dirname) or routing through the resource provider used elsewhere.
Useful? React with 👍 / 👎.
No description provided.