Packages

@parcel/css

1.14.0 · 8 Sep 2022MPL-2.020.3k / weekRepositoryHomepagenpmAtom feed

Your version

1.3.0

14 Feb 2022Where it was published

1.14.0 is the newest release of 1.x.

Release note

This release adds a new standalone CLI for Parcel CSS, implements @import bundling, reduces binary size, and improves performance.

CLI

Parcel CSS now has a standalone CLI written in Rust, which can be used when you only need to compile CSS and don't need a more advanced build tool. It supports all Parcel CSS features, including enabling nesting and custom media, CSS modules, source maps, targets, and more. It also supports a --bundle option, which inlines @import rules. See below for details about that.

Check out the readme for more details.

Bundling

We now have a bundle method in the Node API, and a --bundle option in the CLI, which inlines the contents of @import rules. This lets you write multiple source files, but compile them into a single output file. Parcel CSS handles wrapping rules in @media and @supports blocks as needed, and files are parsed in parallel for performance. This also enables @custom-media rules to be referenced across different files.

Reduced binary size and improved performance

We have reduced the binary size for the Node bindings significantly in this release (4.08 MB -> 2.64 MB). This was accomplished using some Rust compiler options, as well as some refactoring of large methods. This refactoring also happened to improve performance as well by another ~5%! Here are the updated benchmark results:

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.