Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

anchorme is not a function #114

Closed
linweigao opened this issue Jul 31, 2021 · 4 comments
Closed

anchorme is not a function #114

linweigao opened this issue Jul 31, 2021 · 4 comments

Comments

@linweigao
Copy link

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

@nkeyy0
Copy link

nkeyy0 commented Jan 19, 2024

The same issue in prod build using vite

@nkeyy0
Copy link

nkeyy0 commented Jan 19, 2024

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

@nkeyy0
Copy link

nkeyy0 commented Jan 19, 2024

Looks like the issue that wrapper.mjs developed to handle only node environment, not the browser's

@alexcorvi
Copy link
Owner

should be fixed in the latest version 3.0.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants