This question already has an answer here:
- ES6 variable import name in node.js? 5 answers
This works:
import app from './../app.js';
But this doesn't:
import app from path.join(process.cwd(), 'app');
I'm Getting:
SyntaxError: /path/file.js: Unexpected token (5:16)
> 5 | import app from path.join(process.cwd(), 'app');
| ^
It is possible (and/or how) to use "dynamic" paths? (not hardcoding the path or rely in relative paths).