移除路径映射,只让Jest处理路径解析

This commit is contained in:
YHH
2025-08-08 15:57:56 +08:00
parent fc9bf816dd
commit e56278e4a6
2 changed files with 37 additions and 1 deletions

View File

@@ -28,7 +28,27 @@ module.exports = {
verbose: true,
transform: {
'^.+\\.tsx?$': ['ts-jest', {
tsconfig: 'tsconfig.json',
tsconfig: {
target: 'ES2020',
module: 'CommonJS',
moduleResolution: 'node',
lib: ['ES2020', 'DOM'],
strict: true,
esModuleInterop: true,
allowSyntheticDefaultImports: true,
skipLibCheck: true,
forceConsistentCasingInFileNames: true,
experimentalDecorators: true,
emitDecoratorMetadata: true,
isolatedModules: false,
allowJs: true,
resolveJsonModule: true,
baseUrl: '.',
paths: {
'@esengine/ecs-framework': ['../core/src'],
'@esengine/ecs-framework/*': ['../core/src/*']
}
},
useESM: false,
}],
},