Cooker 10 is a clean-break rewrite. The framework is now a Laravel-native frontend toolkit that gives you Tailwind, React, Vue, TypeScript and JSX/TSX — without Node, npm, node_modules, or a lockfile in your project.
Highlights
- Auto-downloaded toolbox — esbuild and tailwindcss binaries are fetched per-platform into
.cooker/binon first use. - npm without npm —
php artisan cooker:add lodash(orreact@^18, or@scope/pkg) downloads tarballs directly from the npm registry into a flat.cooker/packages/layout. Nopackage.json, nonode_modules, no lockfile. - First-class stacks —
cooker:add react,cooker:add vue,cooker:add tailwindinstall dependencies and scaffold a working starter. - Static builds —
cooker:cookwrites hashed bundles topublic/build/. The@cooker('app.js')directive readsmanifest.jsonand emits the right<script type=module>/<link>tag. - Live reload —
cooker:watchruns an embedded SSE server. CSS-only changes hot-swap stylesheets without a full reload; JS or mixed changes reload the page. Auto-reconnects across watcher restarts. Only active whenAPP_DEBUG=true. - Friendly diagnostics — when a build fails, Cooker scans esbuild's output and turns common errors into actionable hints (e.g. "Missing npm package: lodash → Install it with: php artisan cooker:add lodash").
Commands
| Command | What it does |
|---|---|
cooker:install |
Bootstrap config, recipes, .cooker/, optional stack |
cooker:cook |
Production build into public/build/ |
cooker:watch |
Dev mode — incremental rebuilds + live reload |
cooker:add <pkg or stack> |
Install an npm package or a stack |
cooker:remove <pkg or stack> |
Remove an npm package or stack |
cooker:uninstall |
Remove Cooker config and the .cooker/ workspace |
Breaking changes from Cooker 8
This is a clean break. Removed:
- The runtime PHP asset server (
__cooker/{file}route) Engine,Ovens,Preparserscooker-toolbeltandcooker-routesJS exports- The
import x from 'name'→https://esm.run/namerewrite (usecooker:addinstead) - The
mck89/peastdependency (esbuild handles parsing)
To upgrade, see Upgrading from Cooker 8 in the README.
Requirements
- PHP >= 8.3
- Laravel 10 or newer
- ext-zlib, ext-phar, ext-json (standard with most PHP builds)