Commit Graph
23 Commits
Author SHA1 Message Date
robert dennis ea1818fab9 screen lookup cleanup 2026-10-08 16:53:56 -04:00
robert dennis 21c6071680 loader cleanup 2026-10-08 16:53:56 -04:00
robert dennis 1ba166e8a6 slot type cleanup 2026-10-08 16:53:56 -04:00
robert dennis b516dc3646 registry cleanup 2026-10-08 16:53:56 -04:00
robert dennis 8d4f47fa6a extensions facade 2026-10-08 16:53:56 -04:00
robert dennis f154449a80 console command cleanup 2026-10-07 16:32:56 -04:00
robert dennis bd2c62fc6f extension migration fixes 2026-10-07 16:27:19 -04:00
robert dennis fb08b51ae8 composer package checks 2026-10-07 16:22:56 -04:00
robert dennis 752a132773 composer autoloader guard 2026-10-07 16:16:18 -04:00
Sky Mulley dd81db5d4d implement ability to set icon for extensions 2026-10-07 10:46:54 +01:00
DarkZmaj 7fc5934616 Stop extension builds from preloading lazy chunks from the site root (#7253)
## Problem

An extension built with the SDK Vite preset whose lazy screens share a
module requests its shared chunk from the site root. For example
`/chunk.api.Hb1egxRz.js` returns the single page app shell (status 200,
`text/html`), and the browser logs `Failed to load module script:
Expected a JavaScript module script but the server responded with a MIME
type of "text/html"`. The extension still works, because the real
imports are relative, but every page load that touches such a screen
produces failing requests and console errors.

## Reproduction

1. Scaffold an extension with `php artisan p:extension:make demo`.
2. Register two screens with `screens.register('a', () =>
import('./A'))` and `screens.register('b', () => import('./B'))`, where
both import the same helper module.
3. Build it and enable it, then open one of the screens with the browser
network panel open.

The built `dist/client.js` starts with a `__vite__mapDeps` list of bare
chunk file names. Vite's preload helper resolves those names against the
document, not against the bundle.

## Root cause

Vite emits a `modulepreload` dependency map for dynamic imports. The
preset does not turn it off, and the helper's base is the page URL, so
the extension's chunk names resolve to the site root.

## Fix

Set `build.modulePreload` to `false` in `defineExtensionConfig`. Chunks
import each other with relative URLs, which already resolve against the
bundle, so nothing else changes. Preloading is only a hint.

## Testing

* New test in `packages/sdk/vite.spec.ts` builds an entry with two lazy
imports that share a module and asserts that the output contains no
preload map. It fails before the change and passes after it.
* `npx vitest run packages/sdk/vite.spec.ts` passes.
* Checked in a browser: the failing requests for the shared chunk
disappear and the screens still load.

## Compatibility considerations

Extensions rebuilt with the new preset lose a performance hint only.
Existing builds keep working as before.
2026-10-06 22:48:26 -04:00
robert dennis 5a15f59eab console command fixes 2026-10-06 20:11:59 -04:00
robert dennis c1b7294469 autoload validation 2026-10-06 20:11:59 -04:00
robert dennis cd24c7fe04 action wrapping cleanup 2026-10-06 20:11:59 -04:00
robert dennis 7db75f2e4a install handling cleanup 2026-10-06 20:11:59 -04:00
robert dennis 8ebfdf8119 settings cleanup 2026-10-06 20:11:59 -04:00
robert dennis 0899d6babb tighten setting file checks 2026-10-06 20:11:59 -04:00
Sky Mulley 829639a316 properly handle extensions adding menu items causing nav to become too long to handle 2026-10-06 21:16:27 +01:00
Sky Mulley 76b49b1be1 improve reset password security 2026-10-06 13:13:39 +01:00
Anthony e52fdfd416 Fix extension translations staying cached after an extension update
Fixes #7245
2026-10-06 00:18:41 -05:00
robert dennis d3410f8543 fix react doctor errors 2026-10-05 23:28:29 -04:00
robert dennis f21c2f0775 upgrade react 2026-10-05 23:13:58 -04:00
6c0413e39b Start 2.0 development
Co-authored-by: Anthony <anthony@infraly.co>
Co-authored-by: Sky Mulley <daniel.mulley@outlook.com>
2026-10-05 18:10:18 -04:00