mirror of
https://github.com/konvajs/konva.git
synced 2025-11-24 08:46:44 +08:00
refactor: remove rename-imports scripts
Update approach of dealing with file extensions differences between typescript & node. Leverages `rewriteRelativeImportExtensions` that was added in typescript 5.7 [1], and that is recommended path by node to run typescript in the future [2] [1] https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-7.html#path-rewriting-for-relative-paths [2] https://nodejs.org/api/typescript.html#type-stripping
This commit is contained in:
@@ -1,12 +1,17 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"outDir": "lib",
|
||||
"module": "ESNext",
|
||||
"target": "ES2018",
|
||||
"lib": ["ES2019", "dom"],
|
||||
"module": "nodenext",
|
||||
"noUncheckedSideEffectImports": true,
|
||||
"rewriteRelativeImportExtensions": true,
|
||||
"isolatedModules": true,
|
||||
// ideally we want to enable erasableSyntaxOnly & verbatimModuleSyntax for true node interop
|
||||
"erasableSyntaxOnly": false,
|
||||
"verbatimModuleSyntax": false,
|
||||
// "sourceMap": true,
|
||||
"noEmitOnError": true,
|
||||
"lib": ["ES2019", "dom"],
|
||||
"moduleResolution": "node",
|
||||
"declaration": true,
|
||||
"removeComments": false,
|
||||
|
||||
@@ -17,7 +22,11 @@
|
||||
"skipLibCheck": true,
|
||||
// probably we would never enable this one
|
||||
// because it's too strict, konva generates many functions on the runtime
|
||||
"strictPropertyInitialization": false
|
||||
"strictPropertyInitialization": false,
|
||||
// our initializer `field: GetSet<string, this>` will cause `field` to
|
||||
// be set to undefined if target>=ES2022, this also affects tools like `tsx` running locally
|
||||
// https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html#the-usedefineforclassfields-flag-and-the-declare-property-modifier
|
||||
"useDefineForClassFields": false
|
||||
},
|
||||
"include": ["./src/**/*.ts"]
|
||||
"include": ["src"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user