-
Notifications
You must be signed in to change notification settings - Fork 46
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
Add support for tsconfig.json. #26
Comments
This sounds reasonable, so I can add a setting to typescriptOptions
|
I'm guessing that a person would either use a
I will admit, I haven't really thought this through very hard, I just started using the typescript plugin with SystemJS and the first thing I looked into was using my existing |
+1 for @Zoltu's recommendation above. Seems to make the most sense intuitively. |
+1 so I don't have to use relative paths everywhere. When you are levels deep. having ../../../ sucks. |
@frankwallis if tsconfig support is supported, would this be possible using in browser compilation? src/app.ts then src/module/component/comp1/comp1.ts Right now you must do `import {default as d} from '../../../app'; with this plugin. compiling with the ts compiler and the tsconfig doesn't do it. |
@robertbaker - I am not sure if this works even when building with the TypeScript compiler, it seems to me that the code would fail at runtime unless the compiler rewrites the import in the generated JavaScript to point to the correct file. Support for resolution mappings is being handled under microsoft/TypeScript#2338. Currently my plan for tsconfig support is just to load the compiler options (which will actually just be the subset of the options which do not conflict with those used by plugin-typescript) and to use it to automatically load any reference files contained in the 'files' array. |
Just my $0.02 about having both tsconfig and specifying compiler options: The command-line tsc supports this specifically, with command line options overriding options in the tsconfig file. |
I prefer |
Ok I have finally added tsconfig.json support (in 2.1.0), you can use
to load from "tsconfig.json", or set it to a path which will be resolved to locate the file:
The plugin loads compiler options and declaration files from the files array when type-checking is enabled. I have updated some of the examples to show it working. Let me know if you have any problems, thanks. |
awesome! |
https://github.com/Microsoft/TypeScript/wiki/tsconfig.json
tsconfig.json is the official project type for TypeScript projects. In particular, it is where compiler options are stored. In many situations, there may be several tools that are running the TypeScript compiler and they should all use the same options for a given project. In order for this to not become a maintenance nightmare, each of the tools should leverage a shared configuration file, which is tsconfig.json.
I would like to see SystemJS's TypeScript transpiler support tsconfig.json so I don't have to store my compiler options in two places.
The text was updated successfully, but these errors were encountered: