Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to master, this PR will be updated.
Releases
@preact/async-loader@4.0.0
Major Changes
03b8f9d
Thanks @rschristian! - Drops support for Preact v8preact-cli@4.0.0
Major Changes
#1647
03b8f9d
Thanks @rschristian! - Drops support for Preact v8#1647
03b8f9d
Thanks @rschristian! - Alters CSS Module detection to instead rely upon file names, rather than directory names.Treating all CSS files found within
routes/
andcomponents/
as CSS Modules was not obvious, nor did it offer an easy way to opt out (or in) without editing the Webpack config itself.This change makes is so that users can opt into CSS Modules from anywhere in their app by instead naming their CSS files according to the pattern
*.module.css
.Anyone using CSS Modules within
routes/
orcomponents/
will need to alter their CSS files to bex.module.css
. If you've disabled CSS Modules in yourpreact.config.js
, you can remove that bit of configuration and use file names to instead determine behavior.#1647
03b8f9d
Thanks @rschristian! - Reduces theenv
parameter ofpreact.config.js
to only contain 3 values:isProd
,isWatch
, andisServer
.Previously,
env
contained many semi-duplicated values (production
andisProd
, etc) as well as values that were unlikely to be of much use to many users (what flags were set, for instance). Because of this, the signal-to-noise ratio was rather low which we didn't like. As such, we reducedenv
down to the most basic environment info: what type of build ispreact-cli
doing and for which environement?If you customize your Webpack config using a
preact.config.js
, please be aware that you may need to update which values you consume fromenv
.#1647
03b8f9d
Thanks @rschristian! - To increase transparency and user control over thetemplate.html
,<% preact.headEnd %>
and<% preact.bodyEnd %>
will no longer be supported; instead, users should directly adopt the EJS and keep it in their templates.In the past, these were abstracted away as they were a bit unwieldy; EJS might be unfamiliar with users and the way data was retrieved from
html-webpack-plugin
was somewhat less than elegant. However, this has much improved over the years and the abstraction only makes simple edits less than obvious, so it is no longer fulfilling it's purpose.New projects will have a
template.ejs
created in place of the oldtemplate.html
, containing the full EJS template. For existing projects, you can copy the defaulttemplate.ejs
into your project or adapt it as you wish.#1647
03b8f9d
Thanks @rschristian! - HMR / the--refresh
flag is now enabled by default in dev mode.#1647
03b8f9d
Thanks @rschristian! - Changes the JSX transform from 'classic' to the newer 'automatic'Users will no longer need to add
import { h } from 'preact'
in their components; it will be done automatically for them.#1647
03b8f9d
Thanks @rschristian! - Removes--preload
flag and functionality from build command.#1647
03b8f9d
Thanks @rschristian! - Removes--json
&--brotli
flags frompreact build
. Also removes--rhl
alias for--refresh
frompreact watch
.#1647
03b8f9d
Thanks @rschristian! - Updates to use html-webpack-plugin v4#1647
03b8f9d
Thanks @rschristian! - - Upgrades to Webpack v5Any custom configuration you do in your
preact.config.js
may need to be altered to account for this. Plugins may need replacements or different option formats.--esm
flag has been removed.babelrc
no longer overwrites matching keyspreact.config.js
if you want to edit or remove default plugins or presets.#1647
03b8f9d
Thanks @rschristian! - Minimum supported Node version forpreact-cli
is now v14.14.0. Please upgrade if you are on an older version.build
andwatch
commands will no longer take an optionalsrc
directory argument; if you want to change the source directory from the default (./src
), please instead use the--src
flag (i.e.,--src differentSrc
).Upon rebuild, the output directory will no longer be outright deleted; instead, it will be emptied. This has the benefit of better supporting containerized environments where specific directories are mounted. Emptying the directory, rather than deleting and recreating it, ensures a stable reference for those tools.
#1647
03b8f9d
Thanks @rschristian! - Extracts project creation functionality frompreact-cli
intocreate-preact-cli
Setting up new
preact-cli
projects withnpx
is slow, as all dependencies ofpreact-cli
would need to be installed, even though only a handful are used for project initialization. On the other hand, suggesting global installs is less than attractive due to NPM's poor default install location (requiressudo
) and this can get out of sync over time.By extracting project initialization into its own package, we can provide much, much faster project setup times.
To setup a new project, users will use
npm init preact-cli ...
oryarn create preact-cli ...
.Additionally, the
--yarn
flag has been removed in favour of using the yarn initializer (yarn create
).Patch Changes
#1816
372d8fa
Thanks @rschristian! - Removedoptimize-plugin
, now a single bundle will be output.#1647
03b8f9d
Thanks @rschristian! - Disables hash in CSS file names for the SSR build#1814
1777c90
Thanks @rschristian! - Fix for incorrect minification in some specific circumstances. Files should now minify slightly better too.Updated dependencies [
03b8f9d
]:create-preact-cli@1.0.0
Major Changes
#1647
03b8f9d
Thanks @rschristian! - Extracts project creation functionality frompreact-cli
intocreate-preact-cli
Setting up new
preact-cli
projects withnpx
is slow, as all dependencies ofpreact-cli
would need to be installed, even though only a handful are used for project initialization. On the other hand, suggesting global installs is less than attractive due to NPM's poor default install location (requiressudo
) and this can get out of sync over time.By extracting project initialization into its own package, we can provide much, much faster project setup times.
To setup a new project, users will use
npm init preact-cli ...
oryarn create preact-cli ...
.Additionally, the
--yarn
flag has been removed in favour of using the yarn initializer (yarn create
).Patch Changes
372d8fa
Thanks @rschristian! - Removedoptimize-plugin
, now a single bundle will be output.@preact/prerender-data-provider@4.0.0
Major Changes
03b8f9d
Thanks @rschristian! - Updates to use html-webpack-plugin v4