Skip to content

Improve documentation about scaffolding cypress.config.js (CommonJS / ESM) #6385

@MikeMcC399

Description

@MikeMcC399

Description

A Cypress project's package.json field type can be configured with optional values commonjs and module (ESM). The file cypress.config.js is configured during scaffolding according to the value:

type Cypress config
undefined require for CommonJS
commonjs require for CommonJS
module import for ESM

This is not mentioned in the section Quick Configuration.

Also, the Cypress Configuration documentation section Intelligent Code Completionseems to equate CommonJS to JavaScript and ESM to TypeScript.

This could be better explained.

At this time, scaffolding does not recognize TypeScript. This is a different issue, described in cypress-io/cypress#32442

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions