@simplemodule/client/src/resolve-page.ts builds the asset URL as:
const assemblyName = `SimpleModule.${moduleName}`;
const mod = await import(`/_content/${assemblyName}/${assemblyName}.pages.js${suffix}`);
This works for framework-published modules (SimpleModule.Users, etc.) but breaks for any module a downstream app builds in its own assembly (Customers, Invoices, MyApp.Orders — anything without the SimpleModule. prefix).
Right now consumers either roll their own resolver (and lose any future framework UX features) or they can't load the framework's React UIs from their own host. Pick one.
Suggested fix
Try the bare name first, fall back to the SimpleModule-prefixed form. Verified working in a downstream consumer:
async function tryImportPages(name: string) {
try { return await import(`/_content/${name}/${name}.pages.js${suffix}`); }
catch { return null; }
}
const mod =
(await tryImportPages(moduleName)) ??
(await tryImportPages(`SimpleModule.${moduleName}`));
Both local-app modules and framework-published modules resolve correctly, with the harmless cost of one 404 probe before fallback for framework modules. (Could be silenced with a known-prefix list if desired.)
@simplemodule/client/src/resolve-page.tsbuilds the asset URL as:This works for framework-published modules (
SimpleModule.Users, etc.) but breaks for any module a downstream app builds in its own assembly (Customers,Invoices,MyApp.Orders— anything without theSimpleModule.prefix).Right now consumers either roll their own resolver (and lose any future framework UX features) or they can't load the framework's React UIs from their own host. Pick one.
Suggested fix
Try the bare name first, fall back to the SimpleModule-prefixed form. Verified working in a downstream consumer:
Both local-app modules and framework-published modules resolve correctly, with the harmless cost of one 404 probe before fallback for framework modules. (Could be silenced with a known-prefix list if desired.)