Skip to content

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

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. carbon-components-svelte@0.85.0 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

v0.9.0

17 Apr 16:48
Compare
Choose a tag to compare
  • upgrade carbon-components-svelte to v0.63.0 and rebuild components API used by optimizeImports
  • set latest major version of carbon-pictograms-svelte to 12

v0.8.2

11 Apr 00:52
Compare
Choose a tag to compare
  • set latest major version of carbon-icons-svelte to 11

v0.8.1

10 Apr 16:10
Compare
Choose a tag to compare
  • hot fix to re-build components imports map using a non-linked version of carbon-components-svelte

v0.8.0

10 Apr 16:03
Compare
Choose a tag to compare

Compare v0.7.0...v0.8.0

  • upgrade @carbon/icons to v11.0.1
  • update optimizeImports to support carbon-icons-svelte@11 component imports