carbon-preprocess-svelte 0.14.2 stops a build from failing over a Carbon
stylesheet name it can't find, and speeds up the CLI.
Fixes
-
A build no longer fails when a Carbon stylesheet it bundles isn't in
the Carbon installed at its root, as in a monorepo with two Carbon
versions (dcdd708, #342).
0.14.1 passed that name on to svelte-prune, which threw:`styles.stylesheets` names "carbon-components-svelte/css/…", which matches no file.Such a name is left out now, and with none left,
the pruner reads every stylesheet, as 0.14.0 did.
Performance
- The CLI and
optimizeCarbonCssread only the Carbon stylesheets the
app's files import
(import "carbon-components-svelte/css/white.css", a CSS@import, a
<link>), and every one when they import none (f507606, #342).
A CLI run onwhite.cssfor one<Button kind="tertiary">takes
228 ms, where it took 300 ms.
The CSS is the same.