Skip to content

CommonJS module output broken after updating from 5.5.4 to 5.6.2 #59991

Closed as not planned
@SBoudrias

Description

@SBoudrias

🔎 Search Terms

5.6 commonjs cjs node10 moduleResolution modules regression

🕗 Version & Regression Information

⏯ Playground Link

SBoudrias/Inquirer.js#1554

💻 Code

My tsconfig.cjs.json

{
  "extends": "./tsconfig.json",
  "compilerOptions": {
    "lib": ["es2023"],
    "target": "es6",
    "module": "commonjs",
    "moduleResolution": "node10",
    "outDir": "dist/cjs",
    "declarationDir": "dist/cjs/types"
  }
}

🙁 Actual behavior

The files outputted in dist/cjs are now using esm module syntax instead fo cjs (import ... from).

🙂 Expected behavior

As of version 5.5.4, the files outputted in dist/cjs were cjs (require(...)).

Additional information about the issue

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Working as IntendedThe behavior described is the intended behavior; this is not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions