From 869b8fdaa896561a4ce09560b87a0e0e635f127a Mon Sep 17 00:00:00 2001 From: Lars Windolf Date: Sat, 23 Dec 2023 20:58:17 +0100 Subject: [PATCH] Update Javascript Module Import.md --- examples/Javascript Examples/Javascript Module Import.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/Javascript Examples/Javascript Module Import.md b/examples/Javascript Examples/Javascript Module Import.md index 5b35ee636..01e563f20 100644 --- a/examples/Javascript Examples/Javascript Module Import.md +++ b/examples/Javascript Examples/Javascript Module Import.md @@ -12,7 +12,7 @@ If you download packages via `npm` check the `node_modules//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.