SyntaxFix
Write A Post
Hire A Developer
Questions
I've been trying to get this working. Here's what works:
Example:
mod.mjs
export const STR = 'Hello World'
test.mjs
import {STR} from './mod.mjs' console.log(STR)
Run: node test.mjs
You should see "Hello World".