I'm facing an issue with my tsconfig.json file that looks like this:
{"compilerOptions": {
"module": "commonjs",
"noImplicitAny": false,
"removeComments": true,
"preserveConstEnums": true,
"outDir": "./target/src/",
"rootDir": "./src/main/webapp/",
"sourceMap": true,
"experimentalDecorators": true
},
"exclude": ["node_modules", "target"]
}
Upon running tsc, I encountered the following error:
error TS6059: File '../node_modules/ng2-select/components/ng2-select-config.ts' is not under 'rootDir' 'main/webapp'. 'rootDir' is expected to contain all source files.
The problem seems to arise when trying to import ng2-select in a file:
import {Component} from 'angular2/core';
import {select} from 'ng2-select';
If I remove the second import and run tsc again, everything works fine. However, adding the second one triggers the error mentioned above.
Any insights into why it's attempting to compile ng2-select despite being excluded?
Thank you!