packages/cli: make src-relative imports work

This commit is contained in:
Patrik Oldsberg
2020-04-06 15:36:38 +02:00
parent bc4f6ea3ad
commit 28b576967c
6 changed files with 87 additions and 10 deletions
+3 -1
View File
@@ -24,7 +24,9 @@ if (fs.existsSync('jest.config.js')) {
} else if (fs.existsSync('jest.config.ts')) {
module.exports = require(path.resolve('jest.config.ts'));
} else {
const extraOptions = {};
const extraOptions = {
modulePaths: ['<rootDir>'],
};
// Use src/setupTests.ts as the default location for configuring test env
if (fs.existsSync('src/setupTests.ts')) {