Usage styled components via goober
with minimal runtime (look App.jsx
)
Isolated styles via postcss modules (like react-css-modules
)
Typescript out of the box (ts-config
branch)
preact-routers
out of the box
prerender out of the box
Created on Preact 10. + Rollup 2. + Babel 7 template for SPAs.
Clone the repo
git clone https://github.com/Sanshain/preact-boilerplate.git && cd project-templates
Install the deps
npm i
Compile
rollup -c
options.prerender
to true
rollup -c
=> will created init.js inside realese
foldernode init
=> will created prerender.html
in the same foldernpm start
Launch a dev server at localhost:3000
and reload on file changes.
npm run build
Build a production bundle in release
folder.
npm run serve
Serve production assets on localhost.