Preact CLI documentation
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 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.
- Auto-generated Service Workers for offline caching powered by sw-precache.
- 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.
- 1.5kb of conditionally-loaded polyfills for fetch & Promise.
If that sounds something that interests you read our Getting started section.