in this part, which you say can run in browser:
<script type="module"> import {func1} from 'my-lib'; func1(); </script>
where do it get my-lib from?
my-lib
You can have local file that exports func1, say a js file 'my-lib.js' .
func1
Then your import becomes :
import {func1} from './my-lib.js';
inside my-lib.js, have something like:
export function func1() { return `Hello func1!`; }
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
in this part, which you say can run in browser:
where do it get
my-lib
from?You can have local file that exports
func1
, say a js file 'my-lib.js' .Then your import becomes :
inside my-lib.js, have something like: