When you pass in files for compilation with tsc src/index.ts, your tsconfig.json is ignored.
From the documentation:
When input files are specified on the command line, tsconfig.json
files are ignored.
Your npm build script should just be tsc without passing any files.