github parcel-bundler/lightningcss v1.3.0

latest releases: v1.28.0, v1.27.0, v2.26.0...
2 years ago

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.

Thanks to @schultyy and @rrcobb for contributing to the CLI!

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:

image

Don't miss a new lightningcss release

NewReleases is sending notifications on new releases.