I have this small TS app.
Where i have an file called en.js which looks like:
export default {
name: "test"
}
When i try to import it, it does not work:
await import("./en.js")
It says code: 'MODULE_NOT_FOUND'
But if i rewrite it to an .json it works:
//en.json
{
"name": "test"
}
Then the import works just fine:
await import("./en.json");
It needs to be declared as a const in order to be exported as a module. Please try the following
export default const Test = {
name: "test"
}