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:
parent
b0138bdc0f
commit
6738b6a088
3 changed files with 10 additions and 3 deletions
|
@ -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",
|
||||||
|
|
|
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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: [
|
||||||
|
|
Loading…
Add table
Reference in a new issue