Peter: Sure -- in file1.js (or .mjs) export function f() { return 42 }; in file2.js import { f } from "./file1.js"; console.log(f()); or even import * as modl from "./file1.js"; console.log(modl.f());