anchorme.js
anchorme.js copied to clipboard
anchorme is not a function
Error: const retVal = anchorme(input); ^
TypeError: anchorme is not a function
`import anchorme from "anchorme"
// const html = "www.instagram.com" // const retVal = anchorme({ input: html, options: { attributes: { target: "_blank" } } })
console.log(anchorme)
const input = "some text with a link.com"; const retVal = anchorme(input);
console.log(retVal)`
anchorme version 2.1.2
The same issue in prod build using vite
Note: version < 3 works fine, but once I updated version to > 3 it works fine locally, but fails in production build.
Vite
: 4.5.1
Anchorme
: 3.0.5
Fails in all browsers I've tried
Looks like the issue that wrapper.mjs
developed to handle only node environment, not the browser's