I have a file "test.js" in my "/constants" folder with the following content:
const test = "test!"
export default test
My page in the "/pages" folder should read the string from "test.js" and print it
import { test } from "../constants/test"
export default function Home() {
console.log("imported string: " + test)
}
If I run it the browser I get the following output:
"imported string: undefined"
Why is it not reading the string from the file? The path is correct. VSCode autocomplete even finds the file while typing.