使用 Preact 构建 SPA/PWA/离线前端应用的 Webpack3 示例模板
Webpack3 boilerplate for building SPA / PWA / offline front-end apps with :atom_symbol: Preact
Using preact-starter will kickstart your next application! :100: It is designed to fit the "90% use-case" for those who want to build offline-first web apps (see features below).
:triangular_flag_on_post: Important: This is meant for client-side apps only; there is no support included for universal / server-side rendering. I plan to release my own SSR kit shortly!
Please note: Boilerplate does not incorporate the latest "css-in-js" or "css modules" technique. Instead, the more traditional approach is taken, wherein styles and scripts are kept separate. That said, you may certainly and easily take that route if desired. :white_check_mark:
:warning: Boilerplate & commands will evolve as my own development process does. :warning:
git clone https://github.com/lukeed/preact-starter
cd preact-starter
npm install
npm run build
npm start:exclamation: Pro Tip: Use Yarn to install dependencies 3x faster than NPM!
serviceWorker)Any of the following commands can (and should :wink:) be run from the command line.
If using Yarn, all instances of
npmcan be replaced withyarn. :ok_hand:
$ npm run buildCompiles all files. Output is sent to the dist directory.
$ npm startRuns your application (from the dist directory) in the browser.
$ npm run watchLike start, but will auto-compile & auto-reload the server after any file changes within the src directory.
You can inspect and modify the state of your Preact UI components at runtime using the React Developer Tools browser extension.
preact/devtools module in your appMIT © Luke Edwards
暂无开放 Issues,或尚未同步最近议题。