Skip to content

Support for CommonJS in @automapper/nestjs after migration to ESM #629

@mstaniewski

Description

@mstaniewski

Hello,

Since NestJS is CommonJS only, how should we properly consume @automapper/nestjs after migrating to ESM?

The package documentation seems outdated and doesn't provide clear guidance on ESM compatibility.

I attempted to follow the NestJS example, but it didn’t work for me.

Currently I'm struggling with it as importing AutomapperModule from nestjs package results in:
Image

Also tried with async imports, but no luck too
Image

Are there any updated instructions or recommendations for using this package in an CmoonJs-based NestJS project?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions