Skip to content

Commit 705eb8c

Browse files
committed
fix cy in cy
1 parent d3647fb commit 705eb8c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

packages/data-context/src/data/ProjectConfigIpc.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,8 @@ export class ProjectConfigIpc extends EventEmitter {
305305
// If they've got TypeScript installed, we can use
306306
// ts-node for CommonJS
307307
// ts-node/esm for ESM
308-
if (hasTypeScriptInstalled(this.projectRoot)) {
308+
// If we're in a cy in cy project, we will handle registering typescript directly in the server entry point
309+
if (!process.env.CYPRESS_INTERNAL_E2E_TESTING_SELF_PARENT_PROJECT && hasTypeScriptInstalled(this.projectRoot)) {
309310
debug('found typescript in %s', this.projectRoot)
310311
if (isProjectUsingESModules) {
311312
debug(`using --experimental-specifier-resolution=node with --loader ${tsNodeEsm}`)

packages/server/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const startCypress = async () => {
2727
const { entryPoint } = require('minimist')(process.argv.slice(1))
2828

2929
if (entryPoint) {
30+
require('@packages/server/lib/plugins/child/register_ts_node')
3031
module.exports = runChildProcess(entryPoint)
3132
} else {
3233
module.exports = startCypress()

0 commit comments

Comments
 (0)