Releases: carbon-design-system/carbon-preprocess-svelte
v0.11.9
v0.11.8
v0.11.7
v0.11.6
v0.11.5
v0.11.4
v0.11.3
Fixes
One of the breaking changes in Svelte 5 is that it no longer exports walk
from svelte/compiler
. walk
is used by carbon-preprocess-svelte
to traverse the AST to optimize Carbon-related imports at compile time. The official, recommended solution is to import walk
directly from estree-walker
(which is what Svelte itself uses).
v0.11.2
v0.11.1
v0.11.0
This release is a complete rewrite of the library, necessitated because the Svelte ecosystem has evolved so greatly in the past couple of years. For example, previously, the optimizeCss
plugin was not compatible with SvelteKit
v1.
The plugin has been rewritten to work with Vite-based setups (i.e., SvelteKit) along with Rollup and Webpack. The approach to remove unused Carbon selectors has been overhauled as well to eliminate potential false positives. This is essential because carbon-components-svelte
advertises usage of pre-compiled CSS StyleSheets and should have a solution to optimize the production bundle size.
Breaking Changes
- Remove all preprocessors except for
optimizeImports
. Although certain preprocessors are intriguing concepts (elements
), removing them was done to narrow the scope of the library. We may revisit this later down the road when the end developer experience can be assured. optimizeImports
: drop support forcarbon-icons-svelte
version 10,carbon-pictograms-svelte
version 10.- Rewrite
optimizeCss
plugin from scratch; it's now offered as a Vite/Rollup/Webpack plugin.[email protected]
or greater is required.
Using optimizeCss
can now greatly reduce the bundled Carbon CSS. See examples for common setups, including SvelteKit, Vite, Rollup, and Webpack.
Optimized index-CU4gbKFa.css
- Before: 606.26 kB
+ After: 53.22 kB (-91.22%)