diff --git a/packages/core/package.json b/packages/core/package.json index ba4224a00..00b375885 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -5,6 +5,7 @@ "main": "build/index.js", "author": "Silverhand Inc. ", "license": "MPL-2.0", + "type": "module", "private": true, "scripts": { "preinstall": "npx only-allow pnpm", diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json index 64517c9bb..7e9a613ab 100644 --- a/packages/core/tsconfig.json +++ b/packages/core/tsconfig.json @@ -5,10 +5,16 @@ "node", "jest", "jest-matcher-specific-error" - ] + ], + "module": "ESNext" }, "include": [ "src", "jest.*.ts" - ] + ], + "ts-node": { + "moduleTypes": { + "jest.config.ts": "cjs" + } + } } diff --git a/packages/jest-config/jest.config.ts b/packages/jest-config/jest.config.ts index ab9532f89..c41ffa9e6 100644 --- a/packages/jest-config/jest.config.ts +++ b/packages/jest-config/jest.config.ts @@ -5,7 +5,7 @@ const baseConfig: Config.InitialOptions = Object.freeze({ preset: 'ts-jest', transform: { // Enable JS/JSX transformation - '\\.(ts|js)x?$': 'ts-jest', + '\\.(ts)x?$': 'ts-jest', '\\.(svg)$': 'jest-transform-stub', }, transformIgnorePatterns: [