Uncaught SyntaxError: Cannot use import statement outside a moduleexport function currentDate(){
return new Date();
}import {currentDate} from '/modules/func.js';
console.log(currentDate());
<script src="" type="module"></script>. Если среда исполнения node, то в package.json "type": "module". import {currentDate} from '/modules/func.js';