Preact-cli: Preact10 and preact-cli

Created on 4 Feb 2020  路  5Comments  路  Source: preactjs/preact-cli

Hi!
Preact and preact-cli are awesome!
Preact-cli recommended in docs, but preact-cli@latest includes the old version of preact.
I did not find any instructions on how to use preact-cli and preact10 - may be, before preact-cli@3 will be released, docs must not contain preact-cli section or it section must describe how to use preact-cli with preact10?

discussion has-workaround

Most helpful comment

The documentation was written when we were assuming preact-cli@3 would be published shortly. It's been a while and we're still working on getting CLI v3 published.

Regarding instructions for preact-cli@3 + preact@10, run this script:

# scaffold your project:
npx preact-cli@rc create default YOUR-APP-NAME && cd YOUR-APP-NAME

# upgrade it to Preact X:
npm i -D preact-cli@rc && npm i preact@latest preact-router@latest preact-render-to-string@latest && npm rm preact-compat

(source: https://gist.github.com/developit/f1a3425ded9b52206c372b6c6b54ddcb)

All 5 comments

@maoberlehner @developit any thoughts? 馃憖

@artalar I have no idea why I'm referenced here 馃槄

Sorry! I meant @marvinhagemeister

The documentation was written when we were assuming preact-cli@3 would be published shortly. It's been a while and we're still working on getting CLI v3 published.

Regarding instructions for preact-cli@3 + preact@10, run this script:

# scaffold your project:
npx preact-cli@rc create default YOUR-APP-NAME && cd YOUR-APP-NAME

# upgrade it to Preact X:
npm i -D preact-cli@rc && npm i preact@latest preact-router@latest preact-render-to-string@latest && npm rm preact-compat

(source: https://gist.github.com/developit/f1a3425ded9b52206c372b6c6b54ddcb)

Ok, thx

Was this page helpful?
0 / 5 - 0 ratings