Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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';


Thanks, fixed.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: