Skip to content

Commit 4e6cdd6

Browse files
committed
change ts compilation step in build so that it would use rules defined in tsconfig.json
1 parent d71a661 commit 4e6cdd6

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

config/build.js

+10-3
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,16 @@ function runRollup({entry, output, format, minify = false, outputDir = build}) {
4646
}
4747

4848
function compileTypescript(args = '') {
49-
execSync(`./node_modules/.bin/tsc --outDir ${intermediateBuild} --rootDir ./src --baseurl ./src ${args}`, {
50-
stdio: 'inherit',
51-
});
49+
const tscPath = resolvePath(root, './node_modules/.bin/tsc');
50+
const tscConfigPath = resolvePath(root, './tsconfig.json');
51+
const rootDir = resolvePath(root, './src');
52+
53+
execSync(
54+
`${tscPath} --outDir ${intermediateBuild} --project ${tscConfigPath} --rootDir ${rootDir} --baseurl ${rootDir} ${args}`,
55+
{
56+
stdio: 'inherit',
57+
},
58+
);
5259
}
5360

5461
function cleanIntermediateBuild(callback = () => {}) {

0 commit comments

Comments
 (0)