/preact-poi-starter

Preact Example App powered by Poi and BabelJS

Primary LanguageJavaScript

Preact Poi starter

So whats the deal here?

Poi justs works. Of course Poi will try to look up a .babelrc. Since Preact has a different jsx pragma you must have transform-react-jsx plugin with { pragma: "h" } opt at least to work with.

{
  "sourceMaps": true,
  "presets": [
    ["es2015", { "loose":true }],
    "stage-0"
  ],
  "plugins": [
    ["transform-decorators-legacy"],
    ["transform-react-jsx", { "pragma": "h" }]
  ]
}

For this example I added transform-decorators-legacy as well.

run development server

npm run dev aka $ poi [root file]

run production build

npm run build aka $ poi build [root file]