Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

typescript tsc not compiling newly created files

Tags:

typescript

tsc

I'm using typescript on a project the files all compile fine with tsc, I'm using the watch flag to look for changes. The issue I'm having is that when I create a new file tsc does not pick up the new file I have to quit the tsc process and restart it. Is this standard it seems really odd that such a great tool would lack a basic feature like this. Anyone know a work around so I can get tsc to pick up and compile newly created files without the restart?

{
    "compilerOptions": {
        "module": "commonjs",
        "sourceMap": true,
        "target": "ES5",
        "watch": true,
        "project":"public/app/**/*.tsx",
        "outDir": "public/dist",
        "jsx": "react"
    }
}
like image 660
Scott w Avatar asked Oct 17 '25 23:10

Scott w


1 Answers

Following the last reply from this issue https://github.com/Microsoft/TypeScript/issues/4553 I changed my tsconfig.json "include": ["/**/*"] to "include": ["**/*"] and it works for now.

Will update my answer if this proves wrong.

like image 127
etudor Avatar answered Oct 20 '25 14:10

etudor