Skip to content

Commit

Permalink
chore(docs): Adding info about the ESM export in getting started pages
Browse files Browse the repository at this point in the history
  • Loading branch information
planctus committed Dec 18, 2024
1 parent 44e12f4 commit b42b22f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/website/src/pages/ec/getting-started/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ Once you have the `preset-ec` you're ready to setup the ECL integration in your

This assumes your `preset-ec` package is directly accessible in the root of your project, change the path according to your environment.

In this example the main ECL css and js are defined and in addition a css for print and the reset css are added.
In this example the main ECL css and js are defined and in addition a css for print and the reset css are added. The example here demonstrates using the CommonJS version of the JavaScript. If you prefer or need to use the ESM version instead, you can load it like this:
`<script type="module" src="/scripts/ecl-esm-ec.js"></script>`.
The ECL object will be available globally, either on the window object in the browser or on globalThis in environments that support it.

There are also other optional css files distributed that can be used, pikaday is added because it's needed for the ECL datepicker, see below for further information.

Expand Down
4 changes: 3 additions & 1 deletion src/website/src/pages/eu/getting-started/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ Once you have the `preset-eu` you're ready to setup the ECL integration in your

This assumes your `preset-eu` package is directly accessible in the root of your project, change the path according to your environment.

In this example the main ECL css and js are defined and in addition a css for print and the reset css are added.
In this example the main ECL css and js are defined and in addition a css for print and the reset css are added. The example here demonstrates using the CommonJS version of the JavaScript. If you prefer or need to use the ESM version instead, you can load it like this:
`<script type="module" src="/scripts/ecl-esm-eu.js"></script>`.
The ECL object will be available globally, either on the window object in the browser or on globalThis in environments that support it.

There are also other optional css files distributed that can be used, moment.js is added because it's needed for the ECL datepicker, see below for further information.

Expand Down

0 comments on commit b42b22f

Please sign in to comment.