Fix new typescript projects with special characters in path #14093
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does it do?
Fixes the problem with new typescript projects having a period or space in the path not working by changing the included files in the .tsconfig for new typescript projects
Why is it needed?
New typescript projects in paths with a period (.) or a space currently fail to build.
npx create-strapi-app foo.bar --typescript
npx create-strapi-app "bar foo" --typescript
both have a problem when Strapi attempts to run tsc.
I'm actually uncertain exactly why this change is needed because it shouldn't be; it doesn't seem to be an issue with Strapi, it seems to be an issue with
tsc
becausetsc
itself is throwing the error only when the path has special characters, but this workaround seems to fix it.How to test it?
Use this branch and run either of these commands:
npx create-strapi-app foo.bar --typescript
npx create-strapi-app "bar foo" --typescript
Related issue(s)/PR(s)
Paths with periods:
#13237
I have seen other issues regarding spaces in the path, but couldn't find them
This PR fixes a separate issue with paths on Windows:
#14088