Skip to content

Commit

Permalink
Update Javascript Module Import.md
Browse files Browse the repository at this point in the history
  • Loading branch information
lwindolf authored Dec 23, 2023
1 parent f971375 commit 869b8fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/Javascript Examples/Javascript Module Import.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ If you download packages via `npm` check the `node_modules/<name>/dist` director

Now there are two variants depending on the module having a default export or not:

1. `import * as Example from "./example.js";`
2. `import { Example } from "./example.js";`
1. `import * as Example from "./example.esm.js";`
2. `import { Example } from "./example.esm.js";`

Check the `export` statement in the module wether it has `as default` or not. If yes, use variant #1.

0 comments on commit 869b8fd

Please sign in to comment.