Skip to content

Commit

Permalink
Fix/prerender arg validation (#1490)
Browse files Browse the repository at this point in the history
* fix: Adding prerender to list of options for validator

* docs: Adding changeset

* docs: Adding prerender flag to readme
  • Loading branch information
rschristian committed Dec 9, 2020
1 parent 1d145f7 commit 57cb566
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/tender-insects-explain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'preact-cli': patch
---

Adds the 'prerender' argument to the list of arguments to be validated against
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ $ preact build
--template Path to custom HTML template
--preload Adds preload tags to the document its assets (default false)
--analyze Launch interactive Analyzer to inspect production bundle(s)
--prerender Renders route(s) into generated static HTML (default true)
--prerenderUrls Path to pre-rendered routes config (default prerender-urls.json)
--brotli Adds brotli redirects to the service worker (default false)
--inline-css Adds critical css to the prerendered markup (default true)
Expand Down
5 changes: 5 additions & 0 deletions packages/cli/lib/commands/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ const options = [
name: '--analyze',
description: 'Launch interactive Analyzer to inspect production bundle(s)',
},
{
name: '--prerender',
description: 'Renders route(s) into generated static HTML',
default: true,
},
{
name: '--prerenderUrls',
description: 'Path to pre-rendered routes config',
Expand Down

0 comments on commit 57cb566

Please sign in to comment.