@carbon/charts includes @carbon/styles as a direct dependency.
However, Webpack ignores CSS files from @carbon/styles version 1.4.0 if it's not specified as a direct dependency. This is because the CSS files are not included in the package sideEffects. See https://github.com/metonym/carbon-charts-svelte-exxamples/pull/2.
The desired effect would be to use @carbon/charts in Webpack without having to specify @carbon/styles as a direct dependency.
"Must have" functionality
See the previous section.
Specific timeline issues / requests
Not urgent, just wanted to track.
Available extra resources
I attempted to upgrade @carbon/styles in core but received many warnings on peer dependencies. I'm unsure of the protocol here and will defer to maintainers.
@carbon/charts does not pin the @carbon/styles dependency, so a fresh install should automatically use the latest minor version of @carbon/styles (1.9.0).
Contact Details
No response
Summary
@carbon/charts
includes@carbon/styles
as a direct dependency.However, Webpack ignores CSS files from
@carbon/styles
version 1.4.0 if it's not specified as a direct dependency. This is because the CSS files are not included in the packagesideEffects
. See https://github.com/metonym/carbon-charts-svelte-exxamples/pull/2.This issue has been fixed upstream (https://github.com/carbon-design-system/carbon/pull/11608) and is available in
@carbon/styles
version 1.6.0.Justification
Unblocks usage of CSS files with Webpack.
Desired UX and success metrics
The desired effect would be to use
@carbon/charts
in Webpack without having to specify@carbon/styles
as a direct dependency."Must have" functionality
See the previous section.
Specific timeline issues / requests
Not urgent, just wanted to track.
Available extra resources
I attempted to upgrade
@carbon/styles
incore
but received many warnings on peer dependencies. I'm unsure of the protocol here and will defer to maintainers.