how to import backend/module in html component

import {fetch} from ‘wix-fetch’;
import wixlocation from ‘wix-location’;
let myUrl = wixlocation.baseUrl;
console.log(myUrl);
export function urlFetch(urlF) {
return fetch(urlF, {“method”: “get”,
“headers”: { “Access-Control-Allow-Origin”: myUrl, “Content-Type”: “application/json” }
})
}
//Use the following code in one of your site’s front-end files
//to call the multiply function from backend/aFetchModule.jsw.
/*
import {urlFetch} from ‘backend/aFetchModule’;
*/
how to import in html component
i tried

So you are trying to do similar to what it states on this Wix page.
https://support.wix.com/en/article/corvid-web-modules-calling-server-side-code-from-the-front-end

Calling a Function in a Web Module
Unlike regular modules that allow you to export functions, objects, and other items, you can only export functions from web modules. Web modules also always return a promise. This is true even if, in the implementation of the function, it returns a value. For example, if your web module function returns a value, like this:

// Filename: aModule.jsw (web modules need to have a *.jsw* extension)
export function multiply(factor1, factor2) {
return factor1 * factor2;
}

When you call the function, it still returns a promise that resolves to the value. So you need to use it like this:

import {multiply} from 'backend/aModule';
multiply(4,5).then(function(product) {
console.log(product);
// Logs: 20
});

Then you can’t do it with a html iframe too.

If your sum is in the html component, then you will need to pass that data to your page and then you complete the calculation on your actual page and send the total back to the html component.

You can do that by using the HTML Component and it provides you an example too on how to pass data back and forth too.
https://www.wix.com/corvid/reference/$w.HtmlComponent.html
Velo: Working with the HTML iframe Element | Help Center | Wix.com

How do I send data between my page and an HTML Component?
You can send and receive messages between your page and an HTML Component using the postMessage() and onMessage() functions.

The problem is im trying to go to external site and need to receive parameters like API but i encountered problems with security cors problem.
So it was suggested to use the backend. Declare a function to perform the fetch and get the returned data (i can send the data to page code to simplfy the coding)

Trying to fetch from the page code nothing happened so i tried from iframe but then I couldn’t declare the import of the module so Its not working.
I need to do a fetch to external url and retrieve the returned data.
If i do:
$w(“#myiframe”).scr=full_url;
The external site works but i don’t know how to get the returned parameters. Any suggestions?