Import a module (js) into bubble

Hi!

I’m looking to integrate this code into my app where it is supposed to be applied to a button. When I’m running javascript workflow to the button, it is not working. I’ve read that we cannot import a module ?? Is there a way to do it? Thanks a lot.

import code from ‘https://js.getcode.com/v1’;

const { button } = code.elements.create(‘button’, {
currency: ‘usd’,
destination: ‘E8otxw1CVX9bfyddKu3ZB3BVLa4VVF9J7CTPdnUwT9jR’,
amount: 0.05,
});

button.mount(’#button-container’);

@ben4trader

Look like its client side code , rather than backend side.

You can download the file at https://js.getcode.com/v1 and upload it in shared resources. Use the tag in the header to load that JS file.

Ankur@Nocodetalks
Checkout Bubble Plugin Development Course?

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.