mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-28 22:25:24 +00:00
feat: load plugin frontends at runtime and remove plugin ids from the shell
This commit is contained in:
1 parent
49f0286a14
commit
e88d5a52e3
721 files changed
+54265
-44416
No files matched your search
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Plugin sources in this monorepo, for the Vite dev server.
|
||||
*
|
||||
* Empty everywhere except `vite dev`, where the termix-plugin-host Vite plugin
|
||||
* replaces this module with import.meta.glob calls over plugins/<id>/, so
|
||||
* plugin frontends load through Vite with HMR instead of from their built
|
||||
* bundles. A production build keeps it empty: plugins are separate bundles
|
||||
* served from /plugin-assets, never part of the shell's own build.
|
||||
*/
|
||||
|
||||
type Loader = () => Promise<unknown>;
|
||||
|
||||
/** plugin id -> its src/frontend/index.tsx */
|
||||
export const workspaceFrontends: Record<string, Loader> = {};
|
||||
|
||||
/** plugin id -> locale file ("en", "de_DE") -> JSON */
|
||||
export const workspaceLocales: Record<string, Record<string, Loader>> = {};
|
||||
Reference in new issue
Block a user