ajeremias
ajeremias
DDeno
Created by ajeremias on 5/8/2025 in #help
build as CommonJS a deno module built for ESM only
Hi, i was trying to import a npm module @fedify/fedify to a nestjs backend and was not sucessful, cause I figured out that fedify is built for ESM only (with deno) and nestjs is built on commonjs. but i found out this tutorial https://deno.com/blog/publish-esm-cjs-module-dnt i run all the commands on fedify, and then tried to import the project in my project and still was a ESM complaining that Error: No "exports" main defined in so my question is, is there more documentation on how-to exactly build a deno module into commonjs? and how to import it?
1 replies