Skip to content

Releases: carbon-design-system/carbon-preprocess-svelte

v0.11.7

18 Sep 21:39
Compare
Choose a tag to compare

Fixes

  • fix OptimizeCssPlugin to convert buffer to string (9f83cdf)
  • patch postcss and postcss-discard-empty dependencies (49e320b, 38ab7a4)

v0.11.6

20 Aug 14:51
Compare
Choose a tag to compare

Fixes

  • remove code comments from transpiled code (3d2bf48)

v0.11.5

29 Jul 20:47
Compare
Choose a tag to compare

Fixes

  • omit pretty printing component index to reduce package size (fccaad1, #67)

v0.11.4

28 Jul 18:04
Compare
Choose a tag to compare

Fixes

  • optimizeCss: do not remove custom @font-face rules if preserveAllIBMFonts is false (6157e1a, #66)

v0.11.3

30 Apr 03:58
Compare
Choose a tag to compare

Fixes

  • optimizeImports: use walk from estree-walker directly for Svelte 5 compatibility (797969d, #62)

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

08 Apr 23:07
Compare
Choose a tag to compare

Fixes

  • optimizeCss: do not print diff if value is zero (a5ae1af, #59)

v0.11.1

08 Apr 03:09
Compare
Choose a tag to compare

Fixes

  • optimizeCss: only remove selectors containing the Carbon bx-- prefix (077b1f1, #56)

v0.11.0

23 Mar 22:06
Compare
Choose a tag to compare

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 for carbon-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%)

v0.10.0

23 Jul 16:22
Compare
Choose a tag to compare

Breaking Changes

  • upgrade svelte-preprocess from v4.10.7 to v5.0.3 to support TypeScript 5 (5dc458b, #45 by @gschurck)

Fixes

v0.9.1

19 Jun 18:56
Compare
Choose a tag to compare
  • bump svelte-preprocess from v4.10.5 to v4.10.7