bugfix(agentflow): packaage.json sideEffects includes nested css#5899
bugfix(agentflow): packaage.json sideEffects includes nested css#5899ginna-baker merged 3 commits intomainfrom
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a critical bundling issue where CSS files were being inadvertently removed during the build process. By broadening the scope of files marked as having side effects, it ensures that all necessary styling is preserved, preventing unexpected visual regressions or broken layouts in projects that consume this package and utilize tree-shaking optimization. Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This change correctly fixes an issue where CSS files were being tree-shaken by webpack due to an incorrect sideEffects path in package.json. The new glob pattern **/*.css will correctly include nested CSS files. I've suggested a small improvement to make the path more specific to the build output directory for better clarity and safety, while retaining the flexibility for nested files.
Note: Security Review has been skipped due to the limited scope of the PR.
… css Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
The
flowise.cssfile can't be imported currently into my tree-shaken webpack project. Reason: the sideEffects file path isn't hittingdist/flowise.css; therefore, webpack tree-shakes it.More background I learned:
Why "**/*.css" is correct:
The ** glob matches any depth of nested directories. So **/*.css correctly matches: