Skip to content

[feature] enable ESM for projects configured with type=module #1361

@sinedied

Description

@sinedied

Since GenAIScript is an extension of the regular JS environment, it would be nice if it could follow the standard Node.js configuration regarding ESM modules: if there's a package.json file somewhere in the parent root of a script file, that contains the value: "type": "module", then consider it an ESM modules even if it has a .js/.ts extension.

Since that's the normal behavior for Node.js, I think it would be best to follow its convention (and I personally hate .mjs/.mts extensions, but that's on me 😄 ).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions