Closed
Description
Search Terms:
tsc -w watch exclude subfolder recompile
tsconfig.json
"compilerOptions": {
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
"lib": ["es7"], /* Specify library files to be included in the compilation. */
"sourceMap": true, /* Generates corresponding '.map' file. */
"outDir": "dist", /* Redirect output structure to the directory. */
"rootDir": "src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
"strict": true, /* Enable all strict type-checking options. */
"allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
"watch": true,
},
"exclude": [
"node_modules",
"dist",
"upload",
]
}
Expected behavior:
When i create a file into upload/
, tsc should not detect file changes.
Actual behavior:
When i create a file into upload/
, server detects file changes and do incremental compilation.
i'm using "tsc-watch --onSuccess \"node dist/server.js\""
, so, my server is restarted whenever user upload a file.
Is there any way to tsc -w not detect file creation in an excluded project's subfolder?
Thanks in advance.