# DAML codegen js ESM build?

**URL:** <https://forum.canton.network/t/daml-codegen-js-esm-build/4355>\
**Category:** App Development\
**Tags:** typescript, javascript\
**Created:** [April 15, 2022, 6:14pm UTC](https://forum.canton.network/t/daml-codegen-js-esm-build/4355 "2022-04-15T18:14:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark\_Broadhead](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/mark_broadhead/32/3554_2.png) [@Mark\_Broadhead](https://forum.canton.network/u/Mark_Broadhead)\
**Post date:** [April 15, 2022, 6:14pm UTC](https://forum.canton.network/t/daml-codegen-js-esm-build/4355/1 "2022-04-15T18:14:42Z")

</div>

Is there a way to use the `daml codegen js ` command to generate an ESM build? I am having issues using the generated libraries with the Vite build tool because it is a commons library.

---

<div class="post-metadata">

**Author:** ![cocreature](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/cocreature/32/36_2.png) [@cocreature](https://forum.canton.network/u/cocreature)\
**Post date:** [April 18, 2022, 10:55am UTC](https://forum.canton.network/t/daml-codegen-js-esm-build/4355/2 "2022-04-18T10:55:19Z")

</div>

At the moment, you’re stuck with commonjs. I’ve opened a feature request [ESM support in JS Codegen · Issue #13615 · digital-asset/daml · GitHub](https://github.com/digital-asset/daml/issues/13615)
