You are misleading by default and call export.
If you export { double }, you mustimport { double } from './functions';
If you have only one export, it is preferable to use the default export:
export default double;
Then you can import double from './functions':
The reason for this is that named export allows you to import only part of a module. For instance:
export function add (a, b) { return a + b; }
export function subtract (a, b) { return a - b; }
Then you can import { add } from './math.js';not import subtract.
, , .