Preact CLI

Preact CLI helps you get started building a blazing-fast Preact PWA in just a few seconds.

Preact CLI takes the pain out of starting a new project, getting you up and running instantly with a minimal and understandable project structure. It's powered by the same Open Source tools you know and love, just without the need to configure anything - Webpack, Babel, Terser, etc. Everything from hot-reloading to critical CSS inlining is set up optimally for you.

Preact CLI puts your project on the path to excellent performance. New projects ship just 4.5kB of JavaScript in production and get interactive in under 3s - even on slow devices and networks.

Features

Preact CLI comes with the following features out of the box.

  • 100/100 Lighthouse score, right out of the box (proof).
  • Fully automatic code splitting for routes.
  • Transparently code-split any component with an async! prefix.
  • Differential javascript serving.
  • Auto-generated Service Workers for offline caching powered by Workbox.
  • PRPL pattern support for efficient loading.
  • Zero-configuration pre-rendering / server-side rendering hydration.
  • Support for CSS Modules, LESS, Sass, Stylus; with Autoprefixer.
  • Monitor your bundle/chunk sizes with built-in tracking.
  • Automatic app mounting, debug helpers & Hot Module Replacement.
  • Preact.
  • preact-router.
  • 1.5kb of conditionally-loaded polyfills for fetch & Promise.

If that sounds something that interests you read our Getting started section.