Skip to content

Commit 7c05ab2

Browse files
committed
Remove code to delete the tsconfig for ui extensions
We will always want a tsconfig so we can type the shopify global
1 parent 56665e5 commit 7c05ab2

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

packages/app/src/cli/services/generate/extension.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,6 @@ async function uiExtensionInit({
244244

245245
if (templateLanguage === 'javascript') {
246246
await changeIndexFileExtension(directory, srcFileExtension)
247-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
248-
await removeUnwantedTemplateFilesPerFlavor(directory, extensionFlavor!.value)
249247
}
250248
},
251249
},
@@ -325,19 +323,6 @@ async function changeIndexFileExtension(extensionDirectory: string, fileExtensio
325323
await Promise.all(srcFileExensionsToChange)
326324
}
327325

328-
async function removeUnwantedTemplateFilesPerFlavor(extensionDirectory: string, extensionFlavor: ExtensionFlavorValue) {
329-
// Preact needs the tsconfig.json to set the `"jsxImportSource": "preact"` so it can properly build
330-
if (extensionFlavor === 'preact') {
331-
return
332-
}
333-
334-
// tsconfig.json file is only needed in extension folder to inform the IDE
335-
// About the `react-jsx` tsconfig option, so IDE don't complain about missing react import
336-
if (extensionFlavor !== 'typescript-react') {
337-
await removeFile(joinPath(extensionDirectory, 'tsconfig.json'))
338-
}
339-
}
340-
341326
async function addResolutionOrOverrideIfNeeded(directory: string, extensionFlavor: ExtensionFlavorValue | undefined) {
342327
if (extensionFlavor === 'typescript-react') {
343328
await addResolutionOrOverride(directory, {'@types/react': versions.reactTypes})

0 commit comments

Comments
 (0)