patternfly-org icon indicating copy to clipboard operation
patternfly-org copied to clipboard

Bug - CodeSandbox - examples fail because package.json includes CSS dependency

Open dlabrecq opened this issue 9 months ago • 2 comments
trafficstars

Describe the problem The CodeSandbox examples include additional package dependencies via parsing import statements found in PatternFly examples. However, this inadvertently includes CSS imports as well. As a result, multiple CodeSandbox examples fail because a CSS file is not a valid package dependency.

How do you reproduce the problem?

  1. Run latest code locally
  2. Navigate to the chart sparkline or tooltip examples
  3. Open any CodeSandbox example from these pages
  4. View the package.json file
  5. See the CSS file as a dependency, for example:

"react-charts/src/victory/components/Sparkline/examples/./sparkline.css": "latest",

Expected behavior This regex statement in documentation-framework should omit CSS files from the CodeSandbox dependencies

Screenshots Sparkline examples http://localhost:8002/charts/sparkline-chart

Image

Any other information? Even after removing the extra dependency manually, the CSS file no longer loads as expected. CodeSandbox appears to be importing 'react-charts/src/victory/components/Sparkline/examples/./sparkline.css' instead of './sparkline.css'.

Image

dlabrecq avatar Jan 22 '25 15:01 dlabrecq