Skip to content
This repository was archived by the owner on Dec 1, 2019. It is now read-only.

Commit c03c73e

Browse files
author
Stanislav Panferov
committed
feat(*): add tsconfig support and return ts-jsx-loader back
1 parent a0d2092 commit c03c73e

12 files changed

+108
-42
lines changed

README.md

+25-19
Original file line numberDiff line numberDiff line change
@@ -50,30 +50,28 @@ module.exports = {
5050

5151
After that, you would be able to build TypeScript files with webpack.
5252

53-
## Options
53+
## TS defaults
5454

55-
### target
55+
* target = 'es5'
56+
* module = 'commonjs'
5657

57-
Specify the TypeScript output target.
58+
## tsconfig.json
5859

59-
- ES3
60-
- **ES5 (default)**
61-
- ES6
60+
You can use .tsconfig.json file to configure your compiler and loader:
6261

63-
### module
64-
65-
Specify the type of modules that TypeScript emits.
66-
67-
- **CommonJS (default)**
68-
- AMD
69-
70-
### sourceMap *(boolean) (default=false)*
71-
72-
Specify whether or not TypeScript emits source maps.
73-
74-
### noImplicitAny *(boolean) (default=false)*
62+
```
63+
{
64+
"compilerOptions": {
65+
"noImplicitAny": true,
66+
"removeComments": true,
67+
},
68+
"awesomeTypescriptLoaderOptions": {
69+
/* ... */
70+
}
71+
}
72+
```
7573

76-
Specify whether or not TypeScript will allow inferring the `any` type.
74+
## Loader Options
7775

7876
### compiler *(string) (default='typescript')*
7977

@@ -96,6 +94,14 @@ Allows to use several TypeScript compilers with different settings in one app. J
9694

9795
Collect files dependency graph and re-emit all dependent files along with changed file.
9896

97+
### tsconfig *(string) (default='tsconfig.json')*
98+
99+
Specify path to a TS config file. Useful when you have multiple config files. This setting is useless *inside* TS config file.
100+
101+
### useWebpackText *(string) (default=false)*
102+
103+
Use this setting to force loader to use webpack's way to load files. Useful only with ts-jsx-loader. Builds may become slower.
104+
99105
## Using with --watch or webpack-dev-server
100106

101107
This loader has support of both `--watch` and `webpack-dev-server` modes. It handles file dependencies

dist/deps.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/helpers.js

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/helpers.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)