Skip to content

Is this package server-only? Unable to use with Vite 5 #512

@Interpause

Description

@Interpause

Hi, when trying to import HtmlDiffer in a Vite 5-based project, I get the following error

✘ [ERROR] No matching export in "node_modules/node-stdlib-browser/esm/mock/empty.js" for import "createRequire"

    node_modules/@markedjs/html-differ/lib/defaults.js:1:9:
      1 │ import { createRequire } from 'module';
        ╵          ~~~~~~~~~~~~~

Even with vite-plugin-node-polyfills, it still doesn't work. From what I can tell, createRequire cannot be polyfilled in the browser? As such, is this package not compatible with a browser environment at all?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions