Function installExtensions

  • Installs development extensions (e.g., React Developer Tools).

    Returns Promise<void>

    Promise that resolves when extensions are installed, or no-op if dev tools not enabled.

    Only runs when inDevelopment is true or enableDevTools is set via environment.

    async function installExtensions() {
    // Gate behind dev-only or explicit opt-in
    if (!inDevelopment && !enableDevTools) {
    console.debug(
    "[Main] 🔍 Dev tools not enabled, skipping extension installation",
    );
    return;
    }

    return withGroupAsync(`[Main] Install Extensions`, async () => {
    try {
    const result = await installExtension(REACT_DEVELOPER_TOOLS);
    console.info(
    `[Main] ✅ Extensions installed successfully: ${result.name}`,
    );
    } catch (error) {
    console.error("[Main] ❌ Failed to install extensions:", error);
    }
    });
    }