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