Skip to content

Cooker 10.0.0

Latest

Choose a tag to compare

@genericmilk genericmilk released this 29 Apr 13:26

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/bin on first use.
  • npm without npmphp artisan cooker:add lodash (or react@^18, or @scope/pkg) downloads tarballs directly from the npm registry into a flat .cooker/packages/ layout. No package.json, no node_modules, no lockfile.
  • First-class stackscooker:add react, cooker:add vue, cooker:add tailwind install dependencies and scaffold a working starter.
  • Static buildscooker:cook writes hashed bundles to public/build/. The @cooker('app.js') directive reads manifest.json and emits the right <script type=module> / <link> tag.
  • Live reloadcooker:watch runs 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 when APP_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, Preparsers
  • cooker-toolbelt and cooker-routes JS exports
  • The import x from 'name'https://esm.run/name rewrite (use cooker:add instead)
  • The mck89/peast dependency (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)