-
Notifications
You must be signed in to change notification settings - Fork 108
feat: please support the "extends" setting in tsconfig.json (configuration inheritance) #173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hey @antonmata, I modified the typescript-latest example project like this: Karma config: module.exports = function(config) {
config.set({
frameworks: ["jasmine", "karma-typescript"],
files: [
{ pattern: "src/**/*.ts" }
],
preprocessors: {
"**/*.ts": ["karma-typescript"]
},
karmaTypescriptConfig: {
tsconfig: "./tsconfig.json"
},
reporters: ["dots", "karma-typescript"],
browsers: ["Chrome"]
});
}; tsconfig.json: {
"extends": "./base-tsconfig.json",
"compileOnSave": false,
"exclude": [
"node_modules"
]
} base-tsconfig.json (this is a new file I created for this test): {
"compilerOptions": {
"module": "commonjs",
"noImplicitAny": true,
"outDir": "tmp",
"target": "ES5",
"sourceMap": true,
"types" : [
"jasmine"
]
}
} Does this describe your scenario? It works when I run Are you on an OS with a case sensitive file system? The "Uppercase/lowercase mismatch" error is thrown by the dependency walker if a module is imported with a different case than its file name, ie |
The key item for me was the resolve: {
extensions: [".tsx", ".ts", ".js", ".json"],
modules: [
__dirname,
"node_modules"
]
} I kind of figured out that it could be a path issue because I was getting a |
I forgot to mention that I was able to workaround the issue by explicitly defining the |
I was able reproduce the error and this is probably a Typescript bug, microsoft/TypeScript#17617. The compiler seems to lowercase module names if the This triggers the case sensitivity validators in both karma-typescript and the Typescript compiler, if you're using the |
Ah ok, that explains a lot. I was so confused that the error message was showing both paths, but they look alike except for just the casing. I really did not know what or how to fix that, hence just went for the workaround. Thanks for looking into this. |
It would be nice if the
extends
property oftsconfig.json
was supported.I found out the hard way that it wasn't supported. I was getting an
Uppercase/lowercase mismatch
error. I found out that it was because mytsconfig.json
was using theextends
property to inherit from a common config file where thebaseUrl
was defined.The text was updated successfully, but these errors were encountered: