mirror of
https://github.com/cypress-io/cypress.git
synced 2025-12-21 14:21:13 -06:00
13 lines
567 B
JavaScript
13 lines
567 B
JavaScript
// The errors package is always compiled in a production build, but when we're developing locally,
|
|
// there's a chance we can run into a situation where we're requiring the
|
|
// @packages/errors from the child process in a non-ts project, and we need to build this JIT.
|
|
// Otherwise the error will incorrectly be shown as "cannot find module ./src" instead of
|
|
// the actual error. Double check that we can require './src', and if not install ts-node
|
|
try {
|
|
require.resolve('./src')
|
|
} catch (e) {
|
|
require('@packages/ts/register')
|
|
}
|
|
|
|
module.exports = require('./src')
|