The most performant method to load styles is to import SCSS directly from carbon-components. Although it requires more set up, you can reduce the size of the bundle CSS by importing individual component styles instead of a pre-compiled CSS StyleSheet.
# Yarn
yarn add -D carbon-preprocess-svelte
# npm
npm i -D carbon-preprocess-svelte
# pnpm
pnpm i -D carbon-preprocess-svelte
optimizeImports
optimizeImports is a script preprocessor that rewrites base imports from Carbon components/icons/pictograms packages to their source Svelte code paths. This can greatly speed up compile times during development while preserving typeahead and autocompletion hinting offered by integrated development environments (IDE) like VSCode.
The preprocessor optimizes imports from the following packages:
This package uses IBM Telemetry to collect anonymous metrics data in CI environments. By installing this
package as a dependency you are agreeing to telemetry collection. To opt out,
see
Opting out of IBM Telemetry data collection.
For more information on the data being collected, please see the
IBM Telemetry documentation.
The npm package carbon-components-svelte receives a total of 21,719 weekly downloads. As such, carbon-components-svelte popularity was classified as popular.
We found that carbon-components-svelte demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.It has 2 open source maintainers collaborating on the project.
Package last updated on 16 Mar 2024
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.