patternfly-org
patternfly-org copied to clipboard
Bug - CodeSandbox - examples fail because package.json includes CSS dependency
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?
- Run latest code locally
- Navigate to the chart sparkline or tooltip examples
- Open any CodeSandbox example from these pages
- View the package.json file
- 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
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'.