#640·nue

Make Nuemark work on browsers

Author: appuristCreated Oct 23, 2025Updated Jan 16, 2026
Labelslow priority

Describe the Bug

Nuemark can't be used by browser code, it has a nasty dependency on Node.js modules and can only be used in server code.

I'm not sure if this is a bug or intentional limitation but it does not seem like Nuemark was intended to only be used server-side so I will assume it's a bug until clarified.

Environment

Ubuntu 22.04 but all environments.

Minimal Reproduction

import { nuemark } from 'nuemark/index.js'
const html = nuemark(`Hello, World`)
console.info(html) // Hello, World

Logs & Additional Context

The first two lines of render-tag.js are:

import { join, extname } from 'node:path'
import { readFileSync } from 'node:fs'

These are mostly needed to load an svg icon in readIcon because it does not render the name of the file as the svg source, but actually tries to do a server-side read of the SVG content and insert it into the svg element.

I would like to see Nuemark support browser/client-side use, especially if it's only for svg icons that it is broken there.