Skip to content

bugfix(agentflow): packaage.json sideEffects includes nested css#5899

Merged
ginna-baker merged 3 commits intomainfrom
bugfix/agentflow-css-export
Mar 4, 2026
Merged

bugfix(agentflow): packaage.json sideEffects includes nested css#5899
ginna-baker merged 3 commits intomainfrom
bugfix/agentflow-css-export

Conversation

@ginna-baker
Copy link
Collaborator

@ginna-baker ginna-baker commented Mar 4, 2026

The flowise.css file can't be imported currently into my tree-shaken webpack project. Reason: the sideEffects file path isn't hitting dist/flowise.css; therefore, webpack tree-shakes it.

More background I learned:

The sideEffects field in package.json tells bundlers (webpack, Rollup, Vite) which files have side effects and should never be tree-shaken away, even if no explicit import is detected.

⏺ The CSS is exported via "./flowise.css": "./dist/flowise.css", so consumers import it as @flowiseai/agentflow/flowise.css. The path the
bundler sees is dist/flowise.css.

Why "**/*.css" is correct:

The ** glob matches any depth of nested directories. So **/*.css correctly matches:

  • dist/flowise.css <- this is the one my project needs to import
  • Any future CSS files added at any nesting depth

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, 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

  • Bugfix: Webpack Tree-Shaking Issue: Resolved an issue where flowise.css was being incorrectly tree-shaken by bundlers like webpack due to an overly restrictive sideEffects configuration in package.json.
  • Updated sideEffects Configuration: Modified the sideEffects entry in packages/agentflow/package.json from "*.css" to "**/*.css" to correctly include all CSS files, regardless of their nesting depth, ensuring they are not tree-shaken.
Changelog
  • packages/agentflow/package.json
    • Updated the sideEffects array to include "**/*.css" to ensure all CSS files, including nested ones, are recognized by bundlers and not tree-shaken.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

ginna-baker and others added 2 commits March 4, 2026 11:22
… css

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@ginna-baker ginna-baker merged commit 0167e3a into main Mar 4, 2026
7 checks passed
@ginna-baker ginna-baker deleted the bugfix/agentflow-css-export branch March 4, 2026 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants