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
2026-10-06 20:11:59 -04:00
2026-10-06 20:11:59 -04:00
2026-10-06 20:11:59 -04:00
2026-10-05 18:10:18 -04:00
2026-10-06 20:11:59 -04:00
2026-10-06 13:13:39 +01:00
2026-10-05 18:10:18 -04:00
2026-10-05 18:10:18 -04:00
2022-10-24 09:48:30 -06:00
2026-10-05 18:10:18 -04:00
2026-10-05 18:10:18 -04:00
2026-10-05 18:10:18 -04:00
2026-10-05 18:10:18 -04:00
2026-10-05 18:10:18 -04:00
2026-10-05 18:10:18 -04:00
2026-10-05 18:10:18 -04:00
2026-10-05 18:10:18 -04:00
2026-10-06 12:37:03 +01:00
2026-10-05 18:10:18 -04:00
2026-10-06 13:17:53 -04:00
2026-10-05 18:10:18 -04:00
2025-02-14 13:21:00 -07:00
2026-10-05 18:10:18 -04:00
2026-10-05 18:10:18 -04:00
2026-10-06 12:37:03 +01:00
2026-10-06 12:37:03 +01:00
2026-10-05 18:10:18 -04:00
2026-10-05 18:10:18 -04:00
2026-10-05 18:10:18 -04:00
2026-10-05 18:10:18 -04:00
2026-10-05 18:10:18 -04:00
2026-01-04 11:08:17 -08:00
2026-10-05 18:10:18 -04:00
2026-10-05 18:10:18 -04:00
2026-10-05 18:10:18 -04:00
2026-10-05 18:10:18 -04:00

Pterodactyl

GitHub Workflow Status Discord GitHub Releases GitHub contributors

Pterodactyl Panel

Pterodactyl® is a free, open-source game server management panel built with PHP, React, and Go. Designed with security in mind, Pterodactyl runs all game servers in isolated Docker containers while exposing a beautiful and intuitive UI to end users.

Stop settling for less. Make game servers a first class citizen on your platform.

Watch: Introducing Pterodactyl v2

What's new in v2

This branch (2.0-develop) is where Pterodactyl v2 is being built. It is under active development; the current stable release line lives on 1.0-develop.

  • Extension SDK — extend the panel through a versioned API instead of editing core files, so your changes survive updates. Example extensions live in pterodactyl/extensions.
  • Fully modernized tech stack — Vite, React 19, TanStack Router and Query, Tailwind 4 and Laravel 13.
  • Brand new admin area — the admin and client areas are now a single React application with one design.
  • One-click egg importer — browse the egg catalog and import directly from the panel.
  • Theming with design tokens — restyle the panel without rebuilding it.
  • Still 100% free and open source — MIT licensed, as always.

Documentation

Sponsors

I would like to extend my sincere thanks to the following sponsors for helping fund Pterodactyl's development. Interested in becoming a sponsor?

Company About
Buildurly Buildurly is a hardware procurement company. They deliver tailored, enterprise-grade hardware solutions designed around your unique needs. From sourcing to delivery, Buildurly's white-glove service ensures a seamless, worry-free, professional experience.
Hosturly Hosturly is an enterprise hosting provider. They provide cost-effective, high-performance, and reliable services, including VPS, Web, Dedicated, and Colocation.
indifferent broccoli indifferent broccoli is a game server hosting and rental company. With them, you get top-notch computer power for your gaming sessions. They destroy lag, latency, and complexity--letting you focus on the fun stuff.
Infraly, LLC Infraly is an infrastructure company powering the next generation of online services. Through their brands, Infraly delivers cutting-edge solutions across multiple markets. Their vertically integrated approach provides unmatched performance, scalability, and reliability, giving our customers full control.
MineStrator MineStrator is a game server hosting provider. Looking for the most high-end French hosting company for your Minecraft server? More than 24,000 members on our Discord trust us. Give us a try!
Physgun Physgun is a game server hosting provider. Most providers rent rack space and rebrand a panel. At Physgun, they engineer the performance, write the features, and staff the support. Physgun truly is game hosting perfected!
WISP WISP is an industry-leading SaaS platform for game server management, designed for hosting companies, gaming organizations, and enthusiasts. WISP combines modern, intuitive interfaces with powerful tools, making server deployment and administration seamless, scalable, and efficient.

Supported Games

Pterodactyl supports a wide variety of games by utilizing Docker containers to isolate each instance. This gives you the power to run game servers without bloating machines with a host of additional dependencies.

Some of our core supported games include:

  • Minecraft — including Paper, Sponge, Bungeecord, Waterfall, and more
  • Rust
  • Terraria
  • Teamspeak
  • Mumble
  • Team Fortress 2
  • Counter Strike: Global Offensive
  • Garry's Mod
  • ARK: Survival Evolved

In addition to our standard nest of supported games, our community is constantly pushing the limits of this software and there are plenty more games available provided by the community. Some of these games include:

  • Factorio
  • San Andreas: MP
  • Pocketmine MP
  • Squad
  • Xonotic
  • Starmade
  • Discord ATLBot, and most other Node.js/Python discord bots
  • and many more...

License

Pterodactyl® Copyright © 2015 - 2022 Dane Everitt and contributors.

Code released under the MIT License.

Languages
PHP 65%
TypeScript 20.8%
Blade 11.6%
CSS 1.3%
JavaScript 1%
Other 0.2%