-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(web): tailwind class not included on build #1313
Conversation
WalkthroughThe changes involve an update to the Tailwind CSS configuration file located at Changes
Suggested labels
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
✅ Deploy Preview for reearth-web ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
web/tailwind.config.js (1)
9-10
: Consider documenting the path structureWhile the fix addresses the immediate issue, it would be helpful to document why certain paths are explicitly listed versus using the catch-all pattern.
Add a comment explaining the path structure:
content: [ + // Widget-specific paths for special handling "./src/beta/lib/reearth-widget-ui/**/*.{ts,tsx}", "./src/beta/features/Visualizer/Crust/Widgets/Widget/builtin/**/*.{ts,tsx}", + // General application source files "./src/**/*.{ts,tsx}" ],
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
web/tailwind.config.js
(1 hunks)
🔇 Additional comments (1)
web/tailwind.config.js (1)
9-10
: Verify path redundancy in content configuration
The newly added path "./src/**/*.{ts,tsx}"
is a broader pattern that encompasses the other specific paths. This could lead to:
- Redundant file scanning as files under
src/beta/
will be scanned twice - Potentially slower build times due to increased scanning scope
Consider consolidating the paths to avoid redundancy:
content: [
- "./src/beta/lib/reearth-widget-ui/**/*.{ts,tsx}",
- "./src/beta/features/Visualizer/Crust/Widgets/Widget/builtin/**/*.{ts,tsx}",
- "./src/**/*.{ts,tsx}"
+ "./src/**/*.{ts,tsx}"
],
Let's verify if there are any special cases in the specific paths that require separate handling:
✅ Verification successful
Consolidate Tailwind content paths for better maintainability
The specific paths can be safely consolidated into the single "./src/**/*.{ts,tsx}"
pattern because:
- The widget-specific files use standard Tailwind directives and utilities (found in
globals.css
) - The only Tailwind-related usage in widget directories is a utility function using
tailwind-merge
(inutils.ts
) - No special Tailwind configurations or build requirements were found in the widget directories
content: [
- "./src/beta/lib/reearth-widget-ui/**/*.{ts,tsx}",
- "./src/beta/features/Visualizer/Crust/Widgets/Widget/builtin/**/*.{ts,tsx}",
- "./src/**/*.{ts,tsx}"
+ "./src/**/*.{ts,tsx}"
],
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for any unique configurations or special handling in the widget directories
# Check for unique Tailwind configurations or special comments in widget files
rg -l '@tailwind|@apply|tailwind' ./src/beta/lib/reearth-widget-ui/
rg -l '@tailwind|@apply|tailwind' ./src/beta/features/Visualizer/Crust/Widgets/Widget/builtin/
Length of output: 341
Script:
#!/bin/bash
# Let's first check the actual directory structure to locate the widget files
fd -t d "widget|Widget" --ignore-case
# Then check for any Tailwind-related patterns in TypeScript/TSX files
fd -e ts -e tsx | xargs rg -l '@tailwind|@apply|tailwind'
Length of output: 561
Script:
#!/bin/bash
# Let's check the content of the file that uses Tailwind to understand its usage
cat web/src/beta/lib/reearth-widget-ui/utils.ts
# Also check if there are any special build configurations or CSS imports in these widget directories
fd -e css -e scss . web/src/beta/lib/reearth-widget-ui/ web/src/beta/features/Visualizer/Crust/Widgets/
Length of output: 378
Script:
#!/bin/bash
# Let's check the content of globals.css to see if it has any special Tailwind directives
cat web/src/beta/lib/reearth-widget-ui/styles/globals.css
# Also check if there are any special build or configuration files in these directories
fd -e config.js -e config.ts . web/src/beta/lib/reearth-widget-ui/ web/src/beta/features/Visualizer/Crust/Widgets/
Length of output: 1651
Overview
What I've done
What I haven't done
How I tested
Which point I want you to review particularly
Memo
Summary by CodeRabbit