The code used for this example:
import { remoteHello as remoteHello100 } from 'https://nonpm.io/@no-npm/example@1.0.0';
const version = '1.0.1';
function remoteHello() {
return(`Remote hello world from version ${version}\n${remoteHello100()}`);
};
export { remoteHello, version };
And the demo code:
<html>
<head>
<script type="module">
import { remoteHello } from './index.js';
document.getElementById('versions').append(remoteHello());
</script>
</head>
<body>
<h1>Version history:</h1>
<pre id="versions"></pre>
</body>
</html>
See the demo in action here.