Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Meta
create-react-app
Commits
bfe1be15
Unverified
Commit
bfe1be15
authored
2 years ago
by
Chris Shepherd
Browse files
Options
Download
Email Patches
Plain Diff
fix: use appTsConfig to check baseUrl and paths instead
parent
60749684
github/fork/sheepsteak/paths
1 merge request
!10014
Use "paths" in tsconfig.json and jsconfig.json
Pipeline
#1404
failed with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/react-scripts/scripts/utils/verifyTypeScriptSetup.js
+4
-4
...ages/react-scripts/scripts/utils/verifyTypeScriptSetup.js
with
4 additions
and
4 deletions
+4
-4
packages/react-scripts/scripts/utils/verifyTypeScriptSetup.js
+
4
-
4
View file @
bfe1be15
...
...
@@ -260,18 +260,18 @@ function verifyTypeScriptSetup() {
);
}
if
(
parsed
TsConfig
.
compilerOptions
.
paths
!=
null
)
{
if
(
app
TsConfig
.
compilerOptions
.
paths
!=
null
)
{
if
(
semver
.
lt
(
ts
.
version
,
'
4.1.0
'
)
&&
parsed
TsConfig
.
compilerOptions
.
baseUrl
==
null
app
TsConfig
.
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
(
parsed
TsConfig
.
compilerOptions
.
paths
))
{
const
values
=
parsed
TsConfig
.
compilerOptions
.
paths
[
path
];
for
(
const
path
of
Object
.
keys
(
app
TsConfig
.
compilerOptions
.
paths
))
{
const
values
=
app
TsConfig
.
compilerOptions
.
paths
[
path
];
if
(
!
Array
.
isArray
(
values
)
||
values
.
length
>
1
)
{
errors
.
push
(
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets