Unverified Commit bfe1be15 authored by Chris Shepherd's avatar Chris Shepherd
Browse files

fix: use appTsConfig to check baseUrl and paths instead

1 merge request!10014Use "paths" in tsconfig.json and jsconfig.json
Pipeline #1404 failed with stages
Showing with 4 additions and 4 deletions
+4 -4
......@@ -260,18 +260,18 @@ function verifyTypeScriptSetup() {
);
}
if (parsedTsConfig.compilerOptions.paths != null) {
if (appTsConfig.compilerOptions.paths != null) {
if (
semver.lt(ts.version, '4.1.0') &&
parsedTsConfig.compilerOptions.baseUrl == null
appTsConfig.compilerOptions.baseUrl == null
) {
errors.push(
`${chalk.cyan('paths')} requires ${chalk.cyan('baseUrl')} to be set`
);
}
// Webpack 4 cannot support multiple locations
for (const path of Object.keys(parsedTsConfig.compilerOptions.paths)) {
const values = parsedTsConfig.compilerOptions.paths[path];
for (const path of Object.keys(appTsConfig.compilerOptions.paths)) {
const values = appTsConfig.compilerOptions.paths[path];
if (!Array.isArray(values) || values.length > 1) {
errors.push(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment