Fix relaxed and default TypeScript settings not working (#4183)
* Fix relaxed and default TypeScript settings not working * Create itchy-hats-exist.md
This commit is contained in:
parent
4e4061f485
commit
77c018e515
2 changed files with 15 additions and 8 deletions
5
.changeset/itchy-hats-exist.md
Normal file
5
.changeset/itchy-hats-exist.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"create-astro": patch
|
||||
---
|
||||
|
||||
Fix relaxed and default TypeScript settings not working
|
|
@ -343,14 +343,16 @@ export async function main() {
|
|||
if (args.dryRun) {
|
||||
ora().info(dim(`--dry-run enabled, skipping.`));
|
||||
} else if (tsResponse.typescript) {
|
||||
fs.copyFileSync(
|
||||
path.join(
|
||||
url.fileURLToPath(new URL('..', import.meta.url)),
|
||||
'tsconfigs',
|
||||
`tsconfig.${tsResponse.typescript}.json`
|
||||
),
|
||||
path.join(cwd, 'tsconfig.json')
|
||||
);
|
||||
if (tsResponse.typescript !== 'default') {
|
||||
fs.copyFileSync(
|
||||
path.join(
|
||||
url.fileURLToPath(new URL('..', import.meta.url)),
|
||||
'tsconfigs',
|
||||
`tsconfig.${tsResponse.typescript}.json`
|
||||
),
|
||||
path.join(cwd, 'tsconfig.json')
|
||||
);
|
||||
}
|
||||
ora().succeed('TypeScript settings applied!');
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue