Add feature import export
hanako-eo opened this issue · comments
Hana commented
Add the possibility of import export js file
export function hello(){
console.log("hello world")
}
import {hello} from "./imported.js"
hello()
Joao da Silva commented
This is already supported and should work. Did you get any problems trying to run that code?
Hana commented
Oh ok, my problem it's because nodejs can get the content with only "./file", the .js
is optional ^^' and windowjs does not do so
Joao da Silva commented
Thanks for confirming.
The error message could give a hint: if the file can't be read and the filename doesn't end in .js nor in .mjs then mention that the extension is required.
This is a good first bug; the lines to be fixed are here:
Line 466 in ccf3433