0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-20 21:32:31 -05:00

refactor(core): use esm in core (#681)

This commit is contained in:
Gao Sun 2022-04-28 11:19:38 +08:00 committed by GitHub
parent b0138bdc0f
commit 6738b6a088
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 3 deletions

View file

@ -5,6 +5,7 @@
"main": "build/index.js", "main": "build/index.js",
"author": "Silverhand Inc. <contact@silverhand.io>", "author": "Silverhand Inc. <contact@silverhand.io>",
"license": "MPL-2.0", "license": "MPL-2.0",
"type": "module",
"private": true, "private": true,
"scripts": { "scripts": {
"preinstall": "npx only-allow pnpm", "preinstall": "npx only-allow pnpm",

View file

@ -5,10 +5,16 @@
"node", "node",
"jest", "jest",
"jest-matcher-specific-error" "jest-matcher-specific-error"
] ],
"module": "ESNext"
}, },
"include": [ "include": [
"src", "src",
"jest.*.ts" "jest.*.ts"
] ],
"ts-node": {
"moduleTypes": {
"jest.config.ts": "cjs"
}
}
} }

View file

@ -5,7 +5,7 @@ const baseConfig: Config.InitialOptions = Object.freeze({
preset: 'ts-jest', preset: 'ts-jest',
transform: { transform: {
// Enable JS/JSX transformation // Enable JS/JSX transformation
'\\.(ts|js)x?$': 'ts-jest', '\\.(ts)x?$': 'ts-jest',
'\\.(svg)$': 'jest-transform-stub', '\\.(svg)$': 'jest-transform-stub',
}, },
transformIgnorePatterns: [ transformIgnorePatterns: [