Skip to content

xtuc/preact-cli

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

preact-cli

Start building a Preact Progressive Web App in seconds 🔥

Features:

  • 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 ServiceWorker for offline caching powered by sw-precache
  • PRPL pattern support for efficient loading.
  • Zero-configuration pre-rendering / SSR hydration
  • Support for CSS Modules, LESS & autoprefixer
  • Monitor your bundle/chunk sizes with built-in tracking
  • Automatic app mounting, debug helpers & Hot Module Replacement
  • In just 4.5kb you get a productive environment:

Commands

preact create your-app-name: create a new app

preact build: build an app

preact watch: start a dev server

Quickstart

# once and you're good:
npm i -g preact-cli

# create a new project:
preact create my-great-app
cd my-great-app

# start a live-reload/HMR dev server:
npm start

# go to production:
npm run build

Deploying

# create a production build:
npm run build

# generate configuration in Firebase Hosting format:
npm run serve -- --server config

# Copy your static files to a server!

About

Your next Preact PWA starts in 30 seconds.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors

Languages

  • JavaScript 97.0%
  • HTML 3.0%