Skip to content

Commit b2e054a

Browse files
committed
Tweak configs
1 parent 4da2ea8 commit b2e054a

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

tsconfig.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
"target": "es6",
66
"lib": ["es6", "dom"],
77
"rootDirs": ["src"],
8-
"outDir": "lib",
98
"baseUrl": "./",
109
"sourceMap": true,
1110
"declaration": true,
1211
"esModuleInterop": true,
13-
"strict": true /* enable all strict type-checking options */,
14-
/* Additional Checks */
15-
"noImplicitReturns": true /* Report error when not all code paths in function return a value. */
12+
// Enable all strict type-checking options.
13+
"strict": true,
14+
// Report error when not all code paths in function return a value.
15+
"noImplicitReturns": true
1616
},
1717
"include": ["src", "test", "static"],
1818
"exclude": ["node_modules"]

webpack.common.js

+12-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,18 @@ export default {
2020
{
2121
test: /\.ts$/u,
2222
exclude: /node_modules/u,
23-
use: ['babel-loader', 'ts-loader'],
23+
use: [
24+
'babel-loader',
25+
{
26+
loader: 'ts-loader',
27+
options: {
28+
// Prevent `ts-loader` from emitting types to the `lib` directory.
29+
// This also disables type-checking, which is already performed
30+
// independently of the webpack build process.
31+
transpileOnly: true,
32+
},
33+
},
34+
],
2435
},
2536
{
2637
test: /\.js$/u,

0 commit comments

Comments
 (0)