Although I’m an experienced JS developer, I’ve only been using Wix for a little over a month. What I don’t understand is two things :
is this only available from “backend”? That’s fine— I can use it on the backend, but I don’t know how o make it backend-only. I just installed it into the NPM section and I see comments on the forums about using NPM packages on either the front or back but I don’t understand how to switch the package from one to the other. if this is because it is ‘back-end’ only, how do I switch it to run only in the backend? (it would be super helpful if Wix told me “you are trying to run a backend only NPM package on the front end instead of the cryptic error message.”)
Does wix keep an ‘approved’ list of NPM packages as the docs suggest? If so, I assume if it came up in the Wix selection interface (above) it is ‘approved’?
This cleared everything up for me: https://support.wix.com/en/article/velo-where-do-i-put-my-code, particularly the section marked “Backend File Types”. although I still can’t seem to call a back-end function from the front using await , I can get these .jsw (web modules) to work from the front-end using the .then() syntax
Pretty late to the party but heres a working branch-sdk integration using Wix custom elements:
We can’t use Branch SDK on a wix page because it uses DOM specific functionality but you can use it on a custom element and send whatever data you may need between the page and custom element to perform branch-sdk functions on the custom element
In my case I’m just using it to get the link data when a user visits the site from a deep link. I’m using a node.js server to create the links