Each time I execute tsc
, it converts the files to JS format successfully, except for package.json
. I want this file included in my output directory. Currently, my tsconfig.json
looks like this:
{
"exclude": ["node_modules"],
"compilerOptions": {
"target": "ES2020",
"module": "commonjs",
"rootDir": "./",
"resolveJsonModule": true,
"outDir": "../src",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitAny": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"strictBindCallApply": true,
"strictPropertyInitialization": true,
"noImplicitThis": true,
"useUnknownInCatchVariables": true,
"alwaysStrict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"exactOptionalPropertyTypes": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedIndexedAccess": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"allowUnusedLabels": true,
"allowUnreachableCode": true,
"skipDefaultLibCheck": true,
"skipLibCheck": true
}
}
Even though I have set resolveJsonModule
to true
, it still does not include package.json
.
I attempted to use include
:
"include": ["package.json"],
However, this only includes package.json
in the output directory without any other files. How can I resolve this issue?