4 ms·
The first module example is incorrect: // myModule.js export function myModule(someArg) { return someArg; } // main.js import myModu
by AgentME 11y ago
The first module example is incorrect:
// myModule.js
export function myModule(someArg) {
return someArg;
}
// main.js
import myModule from 'myModule';
The import is importing a non-existent default export. Either the export needs to be changed to a default export:
export default function myModule(someArg) {
-or- the import needs to be changed to importing a member:
import {myModule} from 'myModule';
- niix 11y agoThanks, fixed.