(ide: IDE, ideType: IdeType)
| 762 | } |
| 763 | |
| 764 | async function buildConfigTsandReadConfigJs(ide: IDE, ideType: IdeType) { |
| 765 | const configTsPath = getConfigTsPath(); |
| 766 | |
| 767 | if (!fs.existsSync(configTsPath)) { |
| 768 | return; |
| 769 | } |
| 770 | |
| 771 | const currentContent = fs.readFileSync(configTsPath, "utf8"); |
| 772 | |
| 773 | // If the user hasn't modified the default config.ts, don't bother building |
| 774 | if (currentContent.trim() === DEFAULT_CONFIG_TS_CONTENTS.trim()) { |
| 775 | return; |
| 776 | } |
| 777 | |
| 778 | // Only bother with esbuild if config.ts is actually customized |
| 779 | if (currentContent.trim() !== DEFAULT_CONFIG_TS_CONTENTS.trim()) { |
| 780 | const ok = await handleEsbuildInstallation(ide, ideType); |
| 781 | if (!ok) { |
| 782 | // esbuild not available → we already showed a friendly message; skip building |
| 783 | return; |
| 784 | } |
| 785 | await tryBuildConfigTs(); |
| 786 | } |
| 787 | |
| 788 | return readConfigJs(); |
| 789 | } |
| 790 | |
| 791 | async function loadContinueConfigFromJson( |
| 792 | ide: IDE, |
no test coverage detected