Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Specify path to tsconfig.json

I am using webpack with awesome-typescript-loader in an environment with multiple tsconfig.json files. Is there a way in webpack to specify the path of the desired tsconfig.json file?

loaders:

{
        test: /\.ts$/,
        loaders: ['awesome-typescript-loader', 'angular2-template-loader'],
        exclude: [/\.(spec|e2e)\.ts$/]
}
like image 667
TGH Avatar asked Jul 14 '16 16:07

TGH


People also ask

What should I put in Tsconfig json?

The tsconfig.json file specifies the root files and the compiler options required to compile the project. JavaScript projects can use a jsconfig.json file instead, which acts almost the same but has some JavaScript-related compiler flags enabled by default.

What is Lib in Tsconfig json?

TypeScript includes a default set of type definitions for built-in JS APIs (like Math ), as well as type definitions for things found in browser environments (like document ).

Does TS node use Tsconfig json?

ts-node supports a variety of options which can be specified via tsconfig. json , as CLI flags, as environment variables, or programmatically.


1 Answers

loaders: ['awesome-typescript-loader?tsconfig=/path/to/tsconfig.json', 'angular2-template-loader'],
like image 99
mover333 Avatar answered Oct 01 '22 19:10

mover333