Download the example or clone the whole project:
curl https://codeload.github.com/jaredpalmer/razzle/tar.gz/master | tar -xz --strip=2 razzle-master/examples/with-preactcd with-preact
Install it and run:
yarn installyarn start
This shows how to setup Preact with Razzle.
Here is a list of changes from Razzle's base template:
babel-plugin-transform-react-jsxas a devDependency.
renderfunction. Also remove the
<div id="root">element from our html template since Preact can render to the body.