Use in the browser #642
Unanswered
Rodeoclash
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
First of all, thanks so much for putting this library together. I've used it to create https://www.npmjs.com/package/@super-api/super-api-embed which is a small JS library wrapper around some services that we offer.
I am however having some trouble using this in our frontend, in particular in our NextJS project. I've installed my module locally and I can see the built files in my
node_modules
directory, however when I go to use the module, I get a NextJS error:My assumption here is that your project is configured out of the box for use as a Node library rather than a frontend library. I've done a bit of reading w.r.t to setting various keys in the
package.json
(i.e.main
) but haven't have much luck with the tweaks that I've been making.Do you have an idea of what changes might be required to make the NPM library produced work in the browser environment? Am I even on the right track with the assumption that the current configuration is for Node only?
Beta Was this translation helpful? Give feedback.
All reactions