GitHub repository: preactjs/preact-cli
Description: 😺 Your next Preact PWA starts in 30 seconds.
Topics: cli, hacktoberfest, http2, preact, prpl, pwa, starter-kit

preact-cli@3.5.0: tag_name: preact-cli@3.5.0
body: ### Minor Changes

-   [#1798](https://github.com/preactjs/preact-cli/pull/1798) [`96fc0f3`](https://github.com/preactjs/preact-cli/commit/96fc0f30912af86d1c2bc68e47179cd17c50a2a6) Thanks [@rschristian](https://github.com/rschristian)! - TypeScript is now an optional peer dependency, rather than a direct dependency, of `preact-cli`.

    If you use TypeScript in your projects (`.ts` or `.tsx`), you will need to have your own version of TypeScript installed and added to your `package.json`. This gives you greator control over the version of TypeScript used and most already have TypeScript listed as a dependency anyways.

    For those not using TypeScript, no change is needed, and this should make your `node_modules` directory a bit smaller (~20% w/ barebones dependency list).

preact-cli@3.4.6: tag_name: preact-cli@3.4.6
body: ### Patch Changes

-   [#1785](https://github.com/preactjs/preact-cli/pull/1785) [`a4968ee`](https://github.com/preactjs/preact-cli/commit/a4968eea23543756faaf374aa03fe84d8b24e66f) Thanks [@rschristian](https://github.com/rschristian)! - If `--prerenderUrls` file exists on the disk, but it cannot be processed (thrown errors, incorrect format, etc), the build should error out rather than continue with a warning.


-   [#1794](https://github.com/preactjs/preact-cli/pull/1794) [`047837d`](https://github.com/preactjs/preact-cli/commit/047837d9120e7e5fc9aa9766ef25d39fd53ed5e3) Thanks [@teodragovic](https://github.com/teodragovic)! - Output CSS source map on build

preact-cli@3.4.5: tag_name: preact-cli@3.4.5
body: ### Patch Changes

-   [#1774](https://github.com/preactjs/preact-cli/pull/1774) [`05ba4b2`](https://github.com/preactjs/preact-cli/commit/05ba4b2ea5247877475bffb262c996d28fa7da9b) Thanks [@rschristian](https://github.com/rschristian)! - Injects necessary Node options config into new projects if user's Node version is 16+

preact-cli@3.4.4: tag_name: preact-cli@3.4.4
body: ### Patch Changes

-   [#1770](https://github.com/preactjs/preact-cli/pull/1770) [`a526a00`](https://github.com/preactjs/preact-cli/commit/a526a0099ed77bfd2c7e48ba904e7ea05fdc68e3) Thanks [@rschristian](https://github.com/rschristian)! - Fix for devServer info output possibly not matching up against devServer config


-   [#1761](https://github.com/preactjs/preact-cli/pull/1761) [`fb100b3`](https://github.com/preactjs/preact-cli/commit/fb100b332bf5a15a6de306abdf1bc59a8919cbf2) Thanks [@rschristian](https://github.com/rschristian)! - Support proxied loaders w/ `getLoadersByName()` method in users' `preact.config.js`


-   [#1336](https://github.com/preactjs/preact-cli/pull/1336) [`bea4f50`](https://github.com/preactjs/preact-cli/commit/bea4f50a9eb9f56d3a52430d5b1c05834414d56a) Thanks [@developit](https://github.com/developit)! - Temp files generated by `preact-cli` are now unique to a build, allowing for concurrent instances to run at the same time.
@preact/async-loader@3.0.2: tag_name: @preact/async-loader@3.0.2
body: ### Patch Changes

-   [#1763](https://github.com/preactjs/preact-cli/pull/1763) [`3c371f7`](https://github.com/preactjs/preact-cli/commit/3c371f7b54859ce52091e6c11ed237d28e429c62) Thanks [@rschristian](https://github.com/rschristian)! - Fix for possible type error in `async-loader`

preact-cli@3.4.3: tag_name: preact-cli@3.4.3
body: ### Patch Changes

-   [#1756](https://github.com/preactjs/preact-cli/pull/1756) [`a41d498`](https://github.com/preactjs/preact-cli/commit/a41d498b57599d03aaef67b24f9fd58361099403) Thanks [@rschristian](https://github.com/rschristian)! - Improves prerender error message's output and positioning


-   [#1760](https://github.com/preactjs/preact-cli/pull/1760) [`a789c9d`](https://github.com/preactjs/preact-cli/commit/a789c9d030c500db46048af84a705e2a99289c04) Thanks [@rschristian](https://github.com/rschristian)!
    - Fixed bug in which `--esm` was not enabled by default for production builds on v3.4.2
    - Fixed bug in which `--brotli` would overwrite existing assets

preact-cli@3.4.2: tag_name: preact-cli@3.4.2
body: ### Patch Changes

-   [#1749](https://github.com/preactjs/preact-cli/pull/1749) [`691a4e2`](https://github.com/preactjs/preact-cli/commit/691a4e2a3e3d2b939b1b454f783f5c9ee14ca067) Thanks [@AlexanderShushunov](https://github.com/AlexanderShushunov)! - Add support for avif images format


-   [#1736](https://github.com/preactjs/preact-cli/pull/1736) [`396aec8`](https://github.com/preactjs/preact-cli/commit/396aec88a5a5c346b43e01e8dbfda3d3dcb62651) Thanks [@rschristian](https://github.com/rschristian)! - Fix for CSS assets sometimes being mistakenly labeled as 'scripts' in the push-manifest.


-   [#1735](https://github.com/preactjs/preact-cli/pull/1735) [`099876b`](https://github.com/preactjs/preact-cli/commit/099876b348ab04aba427a7a046beb1507bf9c6de) Thanks [@rschristian](https://github.com/rschristian)! - Restricts `preact.config.js`'s `env` types into a more idiomatic subset


-   [#1754](https://github.com/preactjs/preact-cli/pull/1754) [`227bfb7`](https://github.com/preactjs/preact-cli/commit/227bfb7c8c262b773a7979fe3590feab87a43c38) Thanks [@rschristian](https://github.com/rschristian)! - Corrects status code when there is a fatal Webpack error in production builds


-   [#1741](https://github.com/preactjs/preact-cli/pull/1741) [`82662af`](https://github.com/preactjs/preact-cli/commit/82662af41aefc277d7e40578a503ebbae01db665) Thanks [@rschristian](https://github.com/rschristian)! - Fix for source maps containing incorrect paths

preact-cli@3.4.1: tag_name: preact-cli@3.4.1
body: ### Patch Changes

-   [#1711](https://github.com/preactjs/preact-cli/pull/1711) [`5eb5d00`](https://github.com/preactjs/preact-cli/commit/5eb5d00b80bfd35ead1269fbb178973be149f013) Thanks [@rschristian](https://github.com/rschristian)! - Fix ensures that the load-manifest is only attempted to be built in prod. It serves no use in dev (as preloading is limited to prod) and can create a race condition when used alongside HMR.

preact-cli@3.4.0: tag_name: preact-cli@3.4.0
body: ### Minor Changes

-   [#1674](https://github.com/preactjs/preact-cli/pull/1674) [`0346549`](https://github.com/preactjs/preact-cli/commit/0346549a2a42b7cb1edf48df5871c47a621df57d) Thanks [@rschristian](https://github.com/rschristian)! - Supports consuming "proxy" from package.json to proxy API requests in watch mode


-   [#1671](https://github.com/preactjs/preact-cli/pull/1671) [`8d3bd42`](https://github.com/preactjs/preact-cli/commit/8d3bd42759c72ed0cf2f7b8e6be11e109090c2e9) Thanks [@rschristian](https://github.com/rschristian)! - Any environment variables prefixed with 'PREACT_APP_' will automatically be available for reference and use in your application without having to configure `DefinePlugin` any more. Furthermore, if a `.env` file exists in the root of your application, any variables it defines will automatically be available for use.

    Huge shout out to [robinvdvleuten](https://github.com/robinvdvleuten) who provided this functionality through the [`preact-cli-plugin-env-vars`](https://github.com/robinvdvleuten/preact-cli-plugin-env-vars) package in the past.

### Patch Changes

-   [#1667](https://github.com/preactjs/preact-cli/pull/1667) [`a56d904`](https://github.com/preactjs/preact-cli/commit/a56d904ee0a213109a0e6090ab4e8e575b382001) Thanks [@rschristian](https://github.com/rschristian)! - Allows users to author prerender-urls.js as ESM once again


-   [#1693](https://github.com/preactjs/preact-cli/pull/1693) [`6385ec1`](https://github.com/preactjs/preact-cli/commit/6385ec1ce19f3b0b196b7dd5370b5694b34986c2) Thanks [@rschristian](https://github.com/rschristian)! - Bumps dependencies to latest versions where possible and applicable.


-   [#1680](https://github.com/preactjs/preact-cli/pull/1680) [`fcd0375`](https://github.com/preactjs/preact-cli/commit/fcd0375a947b9d7778fb4a393999468fc48ad79f) Thanks [@rschristian](https://github.com/rschristian)! - Fixed bug in push-manifest that would result in undefined entries


-   [#1670](https://github.com/preactjs/preact-cli/pull/1670) [`7afd8bb`](https://github.com/preactjs/preact-cli/commit/7afd8bbf979cb36f1a3dd3b29de2f3db8368de48) Thanks [@rschristian](https://github.com/rschristian)! - Corrects 'build --json' ouput location and 'apple-touch-icon' will respect the publicPath automatically


-   [#1700](https://github.com/preactjs/preact-cli/pull/1700) [`a60f8df`](https://github.com/preactjs/preact-cli/commit/a60f8df8e87935f3b3e03a2bb4aecda801568c83) Thanks [@rschristian](https://github.com/rschristian)! - Removes the archived & non-recommended 'material' template from 'preact list' output


-   [#1426](https://github.com/preactjs/preact-cli/pull/1426) [`7d33cd1`](https://github.com/preactjs/preact-cli/commit/7d33cd1380b5dc7d4b4b970eceabfc8f126da1af) Thanks [@VanTanev](https://github.com/VanTanev)! - Improves prerender error message when offending use of browser globals cannot be found


-   [#1705](https://github.com/preactjs/preact-cli/pull/1705) [`f9ef9b1`](https://github.com/preactjs/preact-cli/commit/f9ef9b1d7de50d2e15ea53a51ca07b8a58345f2c) Thanks [@rschristian](https://github.com/rschristian)! - Fixes HMR / `--refresh` flag in watch mode

preact-cli@3.3.5: tag_name: preact-cli@3.3.5
body: ### Patch Changes

-   [#1659](https://github.com/preactjs/preact-cli/pull/1659) [`d452863`](https://github.com/preactjs/preact-cli/commit/d4528639536e72824d6559ab7cb77c0e4ad8a865) Thanks [@rschristian](https://github.com/rschristian)! - Corrects `push-manifest.json` generation in non-ESM builds


-   [#1658](https://github.com/preactjs/preact-cli/pull/1658) [`6af4e9d`](https://github.com/preactjs/preact-cli/commit/6af4e9de4342cf213ef9771bd22758472d4083a0) Thanks [@rschristian](https://github.com/rschristian)! - Clarifies when the `--template` flag is necessary in the CLI help information.

preact-cli@3.3.4: tag_name: preact-cli@3.3.4
body: ### Patch Changes

-   [#1646](https://github.com/preactjs/preact-cli/pull/1646) [`e98994a`](https://github.com/preactjs/preact-cli/commit/e98994aacd48f8dbd509a291b662ea900f833c87) Thanks [@rschristian](https://github.com/rschristian)! - Bumping `webpack-dev-server`


-   [#1635](https://github.com/preactjs/preact-cli/pull/1635) [`00bea83`](https://github.com/preactjs/preact-cli/commit/00bea83baa1d8ce8774453ee9542880da1314b7f) Thanks [@rschristian](https://github.com/rschristian)! - Ensures TS warnings/errors are not hidden by console clearing


-   [#1634](https://github.com/preactjs/preact-cli/pull/1634) [`8a6732b`](https://github.com/preactjs/preact-cli/commit/8a6732bcc75171035ba21911a600a2177247ddc2) Thanks [@rschristian](https://github.com/rschristian)! - Ensures types are published with package


-   [#1648](https://github.com/preactjs/preact-cli/pull/1648) [`e19ceb0`](https://github.com/preactjs/preact-cli/commit/e19ceb089b45e8a26c309cb533eab01d6e09bd29) Thanks [@rschristian](https://github.com/rschristian)! - Ensures the public path is normalized when registering service workers

preact-cli@3.3.3: tag_name: preact-cli@3.3.3
body: ### Patch Changes

-   [#1624](https://github.com/preactjs/preact-cli/pull/1624) [`0b298ae`](https://github.com/preactjs/preact-cli/commit/0b298aeb6f54bc4b7f6112222f3fe854aae3d744) Thanks @rschristian! - Added typings for users to use in their preact.config.js files


-   [#1622](https://github.com/preactjs/preact-cli/pull/1622) [`39be928`](https://github.com/preactjs/preact-cli/commit/39be928638e8584528af65a1e313981255a5cc24) Thanks @rschristian! - Corrects module resolve priority, fixing issues with duplicated dependencies being incorrectly resolved


-   [#1619](https://github.com/preactjs/preact-cli/pull/1619) [`9039ba2`](https://github.com/preactjs/preact-cli/commit/9039ba2e18bf1bf21b76425562617ad46e9d1d7c) Thanks @rschristian! - Fixing legacy SW generation while ESM is enabled


-   [#1618](https://github.com/preactjs/preact-cli/pull/1618) [`11d5f3b`](https://github.com/preactjs/preact-cli/commit/11d5f3b67811779d9caec24d62acfdb9715b128a) Thanks @rschristian! - Corrects error when `src/sw.js` does not exist and esm is disabled

preact-cli@3.3.2: tag_name: preact-cli@3.3.2
body: ### Patch Changes

-   [#1508](https://github.com/preactjs/preact-cli/pull/1508) [`0cfee78`](https://github.com/preactjs/preact-cli/commit/0cfee78f5c695147fd610284530b01d7b2396b3d) Thanks [@rschristian](https://github.com/rschristian)! - On project create, the CLI won't copy the HTML template or the service worker when the source template is a widget


-   [#1612](https://github.com/preactjs/preact-cli/pull/1612) [`a4a66ce`](https://github.com/preactjs/preact-cli/commit/a4a66ce9fff3320731b8776b14abf59ad6773572) Thanks [@rschristian](https://github.com/rschristian)! - Changes port config precedence to: --port -> \\$PORT -> 8080 (default)


-   [#1613](https://github.com/preactjs/preact-cli/pull/1613) [`3994a23`](https://github.com/preactjs/preact-cli/commit/3994a233d626bc6d28bcfac1e1d876944b0d71ad) Thanks [@rschristian](https://github.com/rschristian)! - Removing old & non-functional config helper `setHtmlTemplate`

preact-cli@3.3.1: tag_name: preact-cli@3.3.1
body: ### Patch Changes

-   [#1599](https://github.com/preactjs/preact-cli/pull/1599) [`e42a61c`](https://github.com/preactjs/preact-cli/commit/e42a61c1f6c97b1a4cce16e3e45d2b13a094d623) Thanks [@rschristian](https://github.com/rschristian)! - Reverts automatic conversion of `--sw` flag in dev to a boolean, which stopped the debug service worker from attaching.

preact-cli@3.3.0: tag_name: preact-cli@3.3.0
body: ### Minor Changes

-   [#1580](https://github.com/preactjs/preact-cli/pull/1580) [`95198f3`](https://github.com/preactjs/preact-cli/commit/95198f36fa608f6edddfe527517b42fc48b2588d) Thanks @developit! - Generate modern (approximately ES2017) code in development mode to better match production output.


-   [#1574](https://github.com/preactjs/preact-cli/pull/1574) [`5117f46`](https://github.com/preactjs/preact-cli/commit/5117f46a289fa8ec91e3c67e4344f9d2ecc0385e) Thanks @rschristian! - Removes Safari nomodule polyfill from template


-   [#1347](https://github.com/preactjs/preact-cli/pull/1347) [`1276aa3`](https://github.com/preactjs/preact-cli/commit/1276aa330cf95ae25fc70d6b621d43065c0556a4) Thanks @teodragovic! - Remove fast-async

### Patch Changes

-   [#1595](https://github.com/preactjs/preact-cli/pull/1595) [`6d100d0`](https://github.com/preactjs/preact-cli/commit/6d100d0876939b3b71e5419c58872aa014773f60) Thanks @rschristian! - Ensuring the sw flag is a boolean in watch mode


-   [#1573](https://github.com/preactjs/preact-cli/pull/1573) [`022d9a8`](https://github.com/preactjs/preact-cli/commit/022d9a8119ea9a4e09963ffbe5ee9adbc9fb0d92) Thanks @rschristian! - Uses native FS promise API rather than promisifying manually

preact-cli@3.2.2: tag_name: preact-cli@3.2.2
body: ### Patch Changes

-   [#1568](https://github.com/preactjs/preact-cli/pull/1568) [`bc6d5f6`](https://github.com/preactjs/preact-cli/commit/bc6d5f6e87e9cd5dc652d7e294fff150b7068c4d) Thanks [@rschristian](https://github.com/rschristian)! - Fixes breaking change to the getLoadersByName config helper

preact-cli@3.2.1: tag_name: preact-cli@3.2.1
body: ### Patch Changes

-   [#1567](https://github.com/preactjs/preact-cli/pull/1567) [`971e633`](https://github.com/preactjs/preact-cli/commit/971e6335ddd20e8cc0233607c47942831e31f4cb) Thanks [@rschristian](https://github.com/rschristian)! - Reverts update to fork-ts-checker-webpack-plugin

preact-cli@3.2.0: tag_name: preact-cli@3.2.0
body: ### Minor Changes

-   [#1465](https://github.com/preactjs/preact-cli/pull/1465) [`3a11043`](https://github.com/preactjs/preact-cli/commit/3a11043f89deee09bc41947677e1a3a58b4ee1bf) Thanks [@ForsakenHarmony](https://github.com/ForsakenHarmony)! - chore: update dependencies

preact-cli@3.1.0: tag_name: preact-cli@3.1.0
body: ### Minor Changes

- [`4b81641`](https://github.com/preactjs/preact-cli/commit/4b8164172ec4e7e9a725909b58bc54eb1f82ed8a) [#1418](https://github.com/preactjs/preact-cli/pull/1418) Thanks [@merceyz](https://github.com/merceyz)! - Added monorepo and Yarn PnP support by correctly loading dependencies, removing faulty install checks, and adding undeclared dependencies

### Patch Changes

- [`0e4f06a`](https://github.com/preactjs/preact-cli/commit/0e4f06a60bb08869831d66844b6b92a948f33e4c) [#1503](https://github.com/preactjs/preact-cli/pull/1503) Thanks [@rschristian](https://github.com/rschristian)! - Ensures the create command returns startup instructions to users

* [`df48437`](https://github.com/preactjs/preact-cli/commit/df484371553a72f3fa5a72effe9577530d95f648) [#1499](https://github.com/preactjs/preact-cli/pull/1499) Thanks [@rschristian](https://github.com/rschristian)! - CLI now only conditionally outputs 200.html & preact_prerender_data.json

- [`c33f020`](https://github.com/preactjs/preact-cli/commit/c33f0207d26402f9b27827acd52303dfd6350c38) [#1435](https://github.com/preactjs/preact-cli/pull/1435) Thanks [@rschristian](https://github.com/rschristian)! - Change ensures root ReadMe is bundled with CLI package on publish

* [`bf668b1`](https://github.com/preactjs/preact-cli/commit/bf668b1e9eda89e45bf6711decc6ee53d76a5880) [#1530](https://github.com/preactjs/preact-cli/pull/1530) Thanks [@rschristian](https://github.com/rschristian)! - Fixes bug causing wrong port to be given to Webpack config

- [`cc2f3e7`](https://github.com/preactjs/preact-cli/commit/cc2f3e787c25696d68aaae6e17c8466b2b6675ac) [#1423](https://github.com/preactjs/preact-cli/pull/1423) Thanks [@rschristian](https://github.com/rschristian)! - Fixes bug with style loader that would strip non-module CSS files if 'sideEffects' was set to false for the package.

* [`c9c48db`](https://github.com/preactjs/preact-cli/commit/c9c48db444b96201d5f478cdb73f668195dcdee2) [#1504](https://github.com/preactjs/preact-cli/pull/1504) Thanks [@rschristian](https://github.com/rschristian)! - Replacing mkdirp with native mkdir recursive

- [`977d59a`](https://github.com/preactjs/preact-cli/commit/977d59a30ec5062569dea62c40359f2be3b2d87e) [#1527](https://github.com/preactjs/preact-cli/pull/1527) Thanks [@jamesgeorge007](https://github.com/jamesgeorge007)! - Do not prompt on supplying the template as an argument

* [`daa51ac`](https://github.com/preactjs/preact-cli/commit/daa51ac4aa5ea10c824f7a33bfc03d71d0aaf5ae) [#1522](https://github.com/preactjs/preact-cli/pull/1522) Thanks [@jamesgeorge007](https://github.com/jamesgeorge007)! - Minor typographical fix

- [`24c7473`](https://github.com/preactjs/preact-cli/commit/24c7473f27fa401449a6da82b37b897b5a45894b) [#1516](https://github.com/preactjs/preact-cli/pull/1516) Thanks [@jgoamakf](https://github.com/jgoamakf)! - Do not produce preRenderData when --no-prerender option is specified.

* [`9f9277b`](https://github.com/preactjs/preact-cli/commit/9f9277be2ed50476147bae5567640b36740b4d38) [#1534](https://github.com/preactjs/preact-cli/pull/1534) Thanks [@rschristian](https://github.com/rschristian)! - Fixes SW flag in dev

preact-cli@3.0.5: tag_name: preact-cli@3.0.5
body: ### Patch Changes

- [`57cb566`](https://github.com/preactjs/preact-cli/commit/57cb566a697ceebcd094057b9db48827897d5b5b) [#1490](https://github.com/preactjs/preact-cli/pull/1490) Thanks [@rschristian](https://github.com/rschristian)! - Adds the 'prerender' argument to the list of arguments to be validated against
preact-cli@3.0.4: tag_name: preact-cli@3.0.4
body: ### Patch Changes

- [`6670ba0`](https://github.com/preactjs/preact-cli/commit/6670ba0b9ee03f03f98cfec490aee996b58a17eb) [#1461](https://github.com/preactjs/preact-cli/pull/1461) Thanks @ForsakenHarmony! - fix: await copying of files in create command

* [`30fb1fc`](https://github.com/preactjs/preact-cli/commit/30fb1fc0a2ec101a46ecbb6539ffccc2aec215d7) [#1478](https://github.com/preactjs/preact-cli/pull/1478) Thanks @rschristian! - No longer copies 'sw-debug.js' to output directory on prod builds. No functional changes, as it was not used.

- [`2c53b0a`](https://github.com/preactjs/preact-cli/commit/2c53b0a94952c19f8e625dfa52ecbc0ae8c0c3cb) [#1438](https://github.com/preactjs/preact-cli/pull/1438) Thanks @VanTanev! - fix: allow an async component to return null rendering

* [`fce7e7a`](https://github.com/preactjs/preact-cli/commit/fce7e7a2a1b3f5cbe9856004a89723ef75b016bf) [#1460](https://github.com/preactjs/preact-cli/pull/1460) Thanks @ForsakenHarmony! - chore: remove preact-compat as it's unused

- [`ab84275`](https://github.com/preactjs/preact-cli/commit/ab84275c7d84c99a57085f9913d93069d461fb95) [#1434](https://github.com/preactjs/preact-cli/pull/1434) Thanks @rschristian! - This disable SSR size tracking. This stops `size-plugin-ssr.json` from being generated and stops file sizes from being reported to the developer.

* [`67fafc8`](https://github.com/preactjs/preact-cli/commit/67fafc8e3d0d98665a193e10bc7c9a1ce2aeeedf) [#1467](https://github.com/preactjs/preact-cli/pull/1467) Thanks @prateekbh! - Allow only valid options for commands.
preact-cli@3.0.2: tag_name: preact-cli@3.0.2
body: ### Patch Changes

- [`07c9a9c`](https://github.com/preactjs/preact-cli/commit/07c9a9c87081d38ecb1729f57091f3984d454428) [#1413](https://github.com/preactjs/preact-cli/pull/1413) Thanks [@JoviDeCroock](https://github.com/JoviDeCroock)! - patch cleanFilename to also fix typescript and jsx files

- [`c136ac4`](https://github.com/preactjs/preact-cli/commit/ff79f0b2f6f0f8877001d075947274306884cf89) [#1207](https://github.com/preactjs/preact-cli/pull/1207) Thanks [@JoviDeCroock](https://github.com/JoviDeCroock)! - Fix the prefresh integration, using `--refresh` should now correctly enable fast-refresh

- [`ff79f0b`](https://github.com/preactjs/preact-cli/commit/ff79f0b2f6f0f8877001d075947274306884cf89) [#1406](https://github.com/preactjs/preact-cli/pull/1406) Thanks [@ForsakenHarmony](https://github.com/ForsakenHarmony)! - chore: add changesets

Preact CLI V3 🎉: tag_name: v3.0.0
body: Preact CLI version 3 is finally here!

This is a major update that upgrades every piece of the toolchain, including the latest versions of underlying tools - Webpack 4 and Babel 7. It also brings a new documentation site: [preactjs.com/cli](https://preactjs.com/cli/).

Here are the features:

- **Modern JavaScript output**
Modern versions of your JavaScript bundles are automatically generated and delivered to the 90% of browsers that support modern JS. Legacy browsers are still fully supported through selectively added polyfills.

- **Critical CSS inlining**
In order to avoid render-blocking network requests, Preact CLI V3 uses [Critters](https://github.com/GoogleChromeLabs/critters/) to inline critical CSS automatically in production builds.

- **Workbox**
This version moves from v2's `sw-precache` to using [Workbox](https://github.com/GoogleChrome/workbox) for service worker generation. Along with this, we've also introduced a new API for customizing your service workers without giving up Preact CLI's default configuration. See the [Preact CLI Service Worker documentation](https://preactjs.com/cli/service-worker/) for more info.

- **Partial hydration**
Applications built with Preact CLI are automatically hydrated in stages, allowing your app's "shell" to render while the code and resources necessary for routes are still loading. This ensures parts of the page become interactive as the code that powers them is downloaded.

- **Better template and service worker editing**
Every new project now includes `template.html` and `sw.js` source files, which you can edit or replace to make changes. Older projects can be upgraded from Preact CLI version 2 by copying these files to the `src` directory.

- **CMS support for prerendering**
The `--prerenderUrls` command-line argument now accepts a `.js` file path. Pointing this at a module that exports an async function makes it possible to dynamically fetch data from a CMS or other content source, which is then used to generate and prerender pages:

    ```js
    export default async () => [
      {
        url: '/',
        data: await readFile('/data/home.json')
      },
      {
        url: '/about',
        data: await readFile('/data/about.json')
      }
    ];
    ```

- **Built-in prerender data serialization and hydration**
Preact CLI now serializes the data used during `--prerenderUrls` prerendering, inlining it into the HTML pages. Data is automatically picked up during hydration and passed to your root component, and can also be accessed anywhere in an app using `@preact/prerender-data-provider`.

- **Prefresh-ready!**
Version 3 of Preact CLI also comes with the option of using [Prefresh](https://github.com/JoviDeCroock/prefresh/), a new and improved form of Hot Module Replacement built and maintained by the Preact team.

**Most importantly**
Thanks to all the people who contributed to Preact CLI v3: it wouldn't have happened without you! 😄
bugfixes: tag_name: 3.0.0-rc.18
body: - Fixes typescript template build issue
async-loader fixes 🎉 : tag_name: 3.0.0-rc.17
body: - Async Loader fix for Preact X #1309 - @developit 
- Normalize pre-render urls #1307 - @BartWaardenburg 
- Conditionally execute async-loader preload callback #1276 - @impronunciable 
Pre-rendering Fixes: tag_name: 3.0.0-rc.16
body: - Fixes flash of content on hydration #1265 - @reznord @developit
- CSS preloading in Firefox #1235 - @developit @prateekbh 
- Fix no-sw log, #1263 - @prateekbh 
- Less loader options bugfix #1101 - @pl12133 
- Security fixes for pre-rendered data #1232 - @JoviDeCroock @prateekbh 
- Apple-touch-icon router bug #1227 - @RyanChristian4427 

Native URL bug fix: tag_name: 3.0.0-rc.14
body: - Fixes native-url bug #1203, thanks @RyanChristian4427 
prefresh + minimal sw API 🎉: tag_name: 3.0.0-rc.13
body: - Uses [prefresh](https://github.com/JoviDeCroock/prefresh) for HMR - @JoviDeCroock 
- Introduces minimal SW API - @prateekbh 
- Fixes support for custom babelrc
Seamless integration with Critters: tag_name: 3.0.0-rc.7
body: - This RC makes sure that CSS from route specific CSS is also inlined in the markup
- Ensures no content jump when webpack loads the complete CSS files over the network.
3.0.0-rc.1: tag_name: v3.0.0-rc.1
body: # Whats new in 3.0

- Webpack 4
- Modern JavaScript builds
- CSS Chunking
- Inline critical CSS
- Out of the box Typescript support
- Service workers with webpack 4
- Brotli support


## Webpack4
The underlying build is now done by Webpack4 instead of Webpack3. This might break your `preact.config.js` if you added some plugins/loaders which only supported Webpack3.

## Modern JavaScript build.
By default the `--esm` flag is enabled, which means all the files are bundled in ES5 and ES6 mode and delivered with [module/nomodule script](https://philipwalton.com/articles/deploying-es2015-code-in-production-today/).

## CSS Chunking
While JavaScript was always code splitted, with this version of preact-CLI even CSS will be automatically code splitted for every route.

## Inline critical CSS
Critical CSS for every pre-rendered page will be inserted in the head for better `first meaningful paint`. This is control via a flag `--critical-css`

## Out of the box Typescript support
With version 3, we have a new template named `Typescript`. You can do `preact create Typescript foo` to create a Typescript project.

## Service workers with workbox
We are dropping sw-precache in favor of workbox. The webpack config also is using the [workbox-webpack-plugin](https://developers.google.com/web/tools/workbox/modules/workbox-webpack-plugin#injectmanifest_plugin). This allows devs to take advantage of advanced modules like background-sync, offline analytics etc.

# Brotli support
preact-CLI can generate brotli bundles for you if you enable it using `--brotli`. The service worker can then intercept the first party JavaScript request and respond with brotli files instead.
**Note:** Add `content-encoding: br` header to brotli files is still hosting/dev's responsibility.

## Bug fixed
- HTML template is now a part of the scaffolded code. Any `template.html` present at the root directory will be used to generate index.html.
- `pre-render.js` can now return a promise which can be used to integrate preact-cli with any CMS of your choice
- `pre-render.js/json` can now give any number of props which will be used to pre render the routes and also will be passed to the route component while pre rendering.
v3.0.0-rc.0: tag_name: v3.0.0-rc.0
body: Had to re release due to accidentally publishing under the npm latest tag
v3.0.0-next.5: tag_name: v3.0.0-next.5
body: ## Minor Changes

- Add `--analyzer` flag to `preact build` (#569): cb70701
    _Starts interactive treemap to inspect production output._

## Patches

- Fix `preact create` argument handling by bumping `sade` dep: ff85102

- Inject `NODE_ENV` value once again: bb8aa34
v3.0.0-next.4: tag_name: v3.0.0-next.4
body: ## Major

- Update to Webpack 4 🎉(#564)
    _Thanks @ForsakenHarmony!_

## Patch

- Update other dependencies: 19a1f54
v3.0.0-next.3: tag_name: v3.0.0-next.3
body: ### Minor

- Update `browserlist` default config value: 9c04eba
    > See [Reference](https://twitter.com/jamiebuilds/status/988559577313492992)

    ```js
    // previous
    ["> 1%", "last 2 versions", "IE >= 9"]
    
    // current
    ["> 0.25%", "IE >= 9"]
    ```

### Patches

- Fix broken babel requirement: 60bfeb1
- Fix `create` command so that target directory name is used as the `--name` fallback: 84432d7

### Chores

- Rework tests to use `puppeteer` instead of `chrome-launcher`: 5b93303
v3.0.0-next.2: tag_name: v3.0.0-next.2
body: ## Minor Changes

- Removed the redundant `https://` protocol check before registering `sw.js`: (33b6672)
    _This is redundant because this is what ServiceWorker does, as defined by its spec._

    _Removing this allows easy testing of your `sw.js` (aka, offline) capabilities because SW also allows the `http` protocol for `localhost` and `127.x.x.x` servers ([source](https://stackoverflow.com/a/34161385/3577474))._

    ```sh
    # Test your Service Worker~

    # Install any server, eg "zeit/serve"
    $ npm install --save-dev serve
    # Build your app for production, including sw.js
    $ preact build
    # Use "zeit/serve" in SPA-mode on "build" dir
    $ serve build --single
    ```

## Chores

- Converted project into monorepo (using `lerna`) in preparation for sub-packages
- Rearranged / shuffled dependencies for TravisCI + monorepo compat
v3.0.0-next.1: tag_name: v3.0.0-next.1
body: > This is one of many pre-release versions, made available on npm via `preact-cli@next` 🎉 

First `next`-tagged release that stems from https://github.com/developit/preact-cli/pull/445. The shortlist of changes in this version (compared to `master`/`v2.2.1`) is the following:

## Breaking

- Require Node `8.x` as a minimum runtime
- Remove `serve` command from the CLI 
   _It will be made available as its own package in the near future._
- Remove `watch` command's custom SSL handling
   _Use webpack-style CLI flags instead:_
   ```
   $ preact watch --https --key <foo> --cert <bar>
   ```
- Rename `--service-worker` flag to `--sw`

## Chores / Refactors

- Replace `yargs` with `sade` 😎 
- Remove Preact CLI hero/logo
- Refactor commands' setup
- Update & fix all tests 🎉 
   - _Tests now complete in 30s (down from 7m)_
   - _TravisCI suite completes in 2m (down from 30m)_
- Move `check.js` into the main CLI binary
   _Performs the check before loading any `async` code_

---

There's still lots to be done~! But publishing this is a good start & allows (all of) us to test each step.
v2.2.1: tag_name: v2.2.1
body: ## Patches

- Fix `Async` transition in complex apps with deep/multiple chunks per route (#504): c5bd3d8
v2.2.0: tag_name: v2.2.0
body: ## Features

- Don't build `sw.js` _at all_ if `--no-service-worker` is passed (#420, #500): 3f670a4
    _Thanks @prateekbh!_

- Prevent page flickers on initial load w/ slow connections (#489, #364, #281): 40a6f38
    _Thanks @lukeed!_
 
## Patches

- Re-include `babel-plugin-syntax-dynamic-import` (#461): 7942483
    _Thanks @plusCubed!_

- Validate new project names within `package.json` (#468, #469): 12648dc, 6460ab1
    _Thanks @milesthedisch and @lukeed!_

- Fix Webpack error message for `c.getModules is not a function` (#472): a1d909a
    _Thanks @developit!_

- Fix inconsistency with Win32 paths (#454): a6608c1
    _Thanks @jgierer12!_

- Merge `serve` config _into_ Firebase hosting config, no overwrite (#374, #429): 741922b
    _Thanks @ralphsmith80!_

- Fix `preact/debug` warning with `Async` routes (#456, #484): 57e9a77, 0158329 
    _Thanks @jgierer12!_

- Ignore `.git*` files within Service Worker assets (#494): 0feddca, cab8288, 647c2ea
    _Thanks @lukeed!_

- Fix import path within babel config (#496): 046f39e
    _Thanks @elisechant!_

- Prevent `TypeError` in Webpack error edge cases (#490): 7006d59
    _Thanks @DemianD!_

- Fix Babel config plugin order (#503): 64ad18d, a7f6580
    _Thanks @danalloway!_

v2.1.1: tag_name: v2.1.1
body: The release fixes the bundle hash values and replaces babel-stage-1-presets with plugins.

Huge thanks to @lukeed for his work 😄

## New & Shiny 🎉🎉
- Allow any prerender values (#430, thanks @lukeed)

## Bugs Fixed
- Fix: Bundle hash across different builds (#459/#460, thanks @otbe, @lukeed)
- Replace Babel Stage-1 Preset with Plugins (#444, thanks @lukeed)
- Fix: Remove DeprecationWarnings during build (#431/#440, thanks @matthewlynch, @lukeed)
v2.1.0: tag_name: v2.1.0
body: The release fixes the HMR bug for dev server, exposes CLI's babel config as a preset

## New & Shiny  🎉 🎉 
- Exposes CLI's babel config as a preset (#405, thanks @zouhir)

## Bugs Fixed
- Fix: HMR fix (#423, thanks @ForsakenHarmony)
- Fix: Style import fix (#160/#159, thanks @ethanroday)
- Fix: adds `ident` prop to the options in `postcss-loader` (#425/#410, thanks @tiagoinacio)
v2.0.2: tag_name: v2.0.2
body: A quick patch for the postcss loader in dev mode and HMR issue.

Bug fixes:
- HMR fix (#400/#417, thanks @zouhir)
- Default value for `name` in package.json (#408/#409, thanks @lukeed)
- PostCSS sourcemaps in dev mode (#403/#407, thanks @lukeed)
v2.0.1: tag_name: v2.0.1
body: This is just a quick patch to enable sourcemaps through PostCSS. Thanks @lukeed! (#404)
2.0.0: tag_name: 2.0.0
body: Hey y'all

We got some goodies for you here, including with some exciting new features like custom templates and many bug fixes.

A huge thanks to @lukeed for the awesome work on **_custom templates_**. This means you can now use any github/gitlab/bitbucket repository as a starting point for your preact-cli project. 😄

## Custom templates

The default templates for preact-cli have been moved to a [preactjs-templates](https://github.com/preactjs-templates) organization. Now you can create your own custom template/boilerplate and use it with preact-cli. To use an Github repo as a template: `preact create user/repo appname`

> Note: You need to place the code for the repo in a folder `template/`, or else it will throw an error.

Current available templates include:

- [default] - Default template with all features.
- [material] - material template using [preact-material-components]
- [simple] - The simplest possible preact setup in a single file

Here are a few things that we have cooked up for 2.0. 😎

## New & Shiny  🎉 🎉 

- Remote templates (#329/#99, thanks @lukeed)
- Custom `https` certs for `preact watch` (#375/#373, thanks @lukeed)
- Webpack 3 (#375/#367, #150, thanks @lukeed @hassanbazzi)
- `preact list`: list all the official preactjs-cli repositories (#384, thanks @reznord)
- Custom CORS origins (#119, thanks @rkostrzewski)
- Values injection into templates (#382/#353, thanks @lukeed)
- Disable service-worker flag (#377/#371, thanks @prateekbh)
- User prompts for `preact create` (#359, 280bcb32d17269b2749f759f11149af29d6442d1/#352, thanks @lukeed, @reznord)
- Update notifier for preact-cli (#361, thanks @reznord)
- Better stack traces for prerender errors (#317/#310, thanks @developit)
- Make template.html and sw.js use publicPath (#323/#315, thanks @lwakefield)

## Bugs Fixed

- change `--name` behavior (#326/#329, thanks @lukeed)
- css-loader & getLoadersByClassName - webpackConfigHelpers (#349/#303, thanks @molily)
- Throw error when `template/` folder not found (#356/#351, thanks @lukeed)
- Remove propsTypes in production build (#259, thanks @rbscott)
- Look for process.env.HTTPS for `preact watch` (#272, thanks @reznord)
- Fix: Check node version (#280, thanks @reznord)
- Fix: Copy media files without corruption (#397, thanks @lukeed)
- Fix: `--json` stats output and resource identifier cleaning (#398/#316, thanks @developit)

[simple]: https://github.com/preactjs-templates/simple
[default]: https://github.com/preactjs-templates/default
[material]: https://github.com/preactjs-templates/material
[preact-material-components]: https://github.com/prateekbh/preact-material-components

1.4.1: tag_name: 1.4.1
body: ### Bug Fixes

- LogLevel module not found (#253/#252)
- `yarn start` fix (#246/#245)
1.4.0: tag_name: 1.4.0
body: ## New & Shiny  🎉 🎉 

- Yarn support! Now you can use yarn for the application. Init project using `preact create my-app-name --yarn` and you are good to go. (#225/#234, thanks @reznord)
- Less verbose errors `+1000 DX` (#206, thanks @rkostrzewski)
- Stylus support (#194/#189, thanks @yavorski)
- Reload `node_modules` in development (#227/@208, thanks @reznord)
- Friendly prerender message + remove UglifyJS from SSR build (#195/#178, thanks @rkostrzewski)
- Multi-route pre-rendering (#192/#185, thanks @framp)
- Immutable build (#172/#23, thanks @thangngoc89, @rkostrzewski)
- Suggest alternate port for developement build (#196/#179, thanks @reznord)

## Bugs Fixed

- No Git support by default! You can use `preact create my-app --git` for initialising a repo with git (#237/#216, thanks @prateekbh)
- Check for all loaders using proxy loader (#233/#235, thanks @rkostrzewski)
- Fix: Cannot find module ssr-bundle (#231/#223, thanks @rkostrzewski)
- Fix: Defaults to css (#238 #230/#201, thanks @yavorski)
- Badges (#221/#219, thanks @reznord)
- Fix: Enabling create app in current directory using `preact create my-app --dest . --force` (#200/#110, thanks @prateekbh)
- Fix: Babel upgrade to stage-1 (#184, thanks @SaraVieira)
- Fix: Remove `-h` alias for `--host` (#181/180, thanks @minhchu)
- Fix: Check node version before initiating repo (#171/#169, thanks @reznord, @lukeed)
- Fix: Minimum Node version required v6 (#168/165. thanks @lukeed)
- Fix: `preact serve --server config --dest XX` (#157/#97, thanks @developit)
- Fix: Initial commit when git user email is note defined (#207/#202, thanks @knight-bubble)
- Fix: link `:active/:hover` color accessibility in the examples, lighthouse 💯 (#241, thanks @developit)

## Other wonderful things 🎉 

- We now have a curated list of plugins added in [wiki page](https://github.com/developit/preact-cli/wiki/Plugins) which you can plugin and then use it in the application. Thanks to @SaraVieira, @rkostrzewski for this. 
1.3.0: tag_name: 1.3.0
body: ## New & Shiny

- Add support for custom configuration! Drop a `preact.config.js` into your repo and export a function to mutate the webpack configuration to your heart's content. (#56, thanks @rkostrzewski et al)
- Switch prerendering to use Webpack (#43/#39/#62/#71, thanks @rkostrzewski)
- We'll now pick up your custom `.babelrc` if it exists (#153, thanks @lukeed)
- Add `create-react-class` to `preact-compat` aliases (#132, thanks @diagramatics)
- Respect "browserslist" config (#125, thanks @lukeed)
- Auto-initialize new projects with `git init` if git is present (#35, thanks @fivetanley)

## Bugs Fixed

- Improved support for `preact-material-components` and other ES2015 libraries (#42/#117, thanks @prateekbh)
- Fix Favicon (#135, thanks @hassanbazzi)
- Fix possible duplicate copies of preact in production build (#126/#133, thanks @reznord)
- Fix: `Promise` polyfill is now loaded before webpack bundle (#127, thanks @rkostrzewski)
- Enable source maps in production (#140, thanks @rkostrzewski)
- Fix overzealous Uglify unsafe options (#136, thanks @dignifiedquire)

## Other Wonderful Things

- 🎉 We now have tests! 🎉 Huge thanks to @rkostrzewski for building a comprehensive suite - we're tracking file sizes and snapshots for the demo applications, so you can be sure a preact-cli release won't affect your code (or only in a positive way).
1.2.0: tag_name: 1.2.0
body: This is a preview of the next version of Preact CLI.  Mainly behind-the-scenes changes, in particular we're now using Webpack to bundle for SSR/prerendering instead of trying to run things directly in Node.
1.1.2: tag_name: 1.1.2
body: - Switch to [devcert](https://github.com/davewasmer/devcert) _(a fork for now)_ for cert generation.

**Please Note:** This means we now automatically install a root CA specific to your machine for you. You should remove the old one if you manually added it to your trust stores.
1.1.1: tag_name: 1.1.1
body: A bunch of little tweaks come to you in `1.1.1`!
There are new features coming in the next release like custom configuration, stay tuned.

- Improvements to the scaffolded apps (#82, thanks @davi-mbatista)
- Fix preact-cli breaking Firebase (#87/#92, thanks @lukeed)
- Update simplehttp2server installer to 2.0.0 (#94, thanks @1000ch)
- Use full unminified Preact source in development mode (#90, thanks @thangngoc89)
- Fix issue where compilation errors would produce a non-zero exit code (#61/#86, thanks @rkostrzewski)
1.1.0: tag_name: 1.1.0
body: We've got a bunch of updates since the initial release:

- Make CLI options more strict, and produce an error for unknown options (#8 #14 - thanks @vitormalencar & @rkostrzewski)
- Install `eslint-config-synacor` during project creation (#19 - thanks @maoberlehner)
- Allow pre-installation of plugins via `preact create --less` and `preact create --sass`
- Add `preact build --json` option to output webpack stats (#29 - thanks @rkostrzewski)
- Consistent hashing via NamedModulesPlugin (#20 #27 - thanks @lukeed & @rkostrzewski)
- Support project templates with no manifest or icons by providing internal defaults
- Change the default project type to "full", which has a `src/` directory (#81)
- Change HTML template to enable zooming (thanks @robdodson)
- Add `200.html` for pushstate routing (#54 - thanks @prateekbh)
- Optimize all template app images (#48 - thanks @krawaller)
- Fix active classname for links in the template app (#33 - thanks @iiegor)
- Fix incorrect dev server address in console (#57 - thanks @rkostrzewski)
- Fix issue where `async!` produced the wrong chunk path (#50 - thanks @rkostrzewski)
- Fix babel breaking within `.babelrc` directories (#63 - thanks @lukeed)
- Fix `async!`-loaded components diff issue when routing (#72 - thanks @BenoitZugmeyer)
- Enable and document `preact watch --https` option
1.0.0: tag_name: 1.0.0
body: ### Initial public release!

`npm install -g preact-cli` 🎉