Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions apps/desktop/src/components/main/body/extensions/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,13 @@ import { commands, type ExtensionInfo } from "@hypr/plugin-extensions";

import type { ExtensionViewProps } from "../../../../types/extensions";

const bundledExtensionModules = import.meta.glob<{
default: ComponentType<ExtensionViewProps>;
}>("@extensions/*/ui.tsx", { eager: true });

// Bundled extensions are no longer included at build time.
// Extensions are expected to be loaded at runtime via the extensions plugin.
export const bundledExtensionComponents: Record<
string,
ComponentType<ExtensionViewProps>
> = {};

for (const path in bundledExtensionModules) {
const mod = bundledExtensionModules[path];
const parts = path.split("/");
const extensionId = parts[parts.length - 2];
bundledExtensionComponents[extensionId] = mod.default;
}

const dynamicExtensionComponents: Record<
string,
ComponentType<ExtensionViewProps>
Expand Down
5 changes: 1 addition & 4 deletions apps/desktop/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@
"noFallthroughCasesInSwitch": true,

/* Path aliases */
"baseUrl": ".",
"paths": {
"@extensions/*": ["../../extensions/*"]
}
"baseUrl": "."
},
"include": ["src"],
"references": [{ "path": "./tsconfig.node.json" }]
Expand Down
1 change: 0 additions & 1 deletion apps/desktop/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export default defineConfig(() => ({
"@tauri-apps/plugin-updater": "/src/mocks/updater.ts",
}
: {}),
"@extensions": path.resolve(__dirname, "../../extensions"),
},
},
test: {
Expand Down
Loading