Fix Vite build failure and enhance yarn-update workflow#292
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
- Remove imports from vendor/filament/support, actions, forms, etc. - Replace with @import 'tailwindcss' for Tailwind CSS v4 compatibility - Update all theme files to use proper @source directives - Delete unused merge.css file This fixes the build error where Vite couldn't resolve vendor CSS paths because composer install runs after vite build in the CI workflow. Co-authored-by: nielsdrost7 <47660417+nielsdrost7@users.noreply.github.com>
nielsdrost7
left a comment
There was a problem hiding this comment.
@copilot
I don't agree with removing those references to the vendor folder. The folder is there, once composer install gets run.
My prompt was meant to say that composer install needs to run before anything with yarn gets done.
- Restore original CSS vendor imports in app.css and theme files - Restore merge.css file - Reorder release workflow: run composer install BEFORE yarn build - PHP/Composer setup now runs before Node.js/Yarn setup - Frontend build can now resolve vendor CSS paths correctly Co-authored-by: nielsdrost7 <47660417+nielsdrost7@users.noreply.github.com>
You're absolutely right. I misunderstood the issue. Fixed in commit e89b1af. I've reverted all CSS changes and instead fixed the workflow build order. The release workflow now runs New order:
The CSS vendor imports are back to their original state, and the build will work correctly now that the vendor directory exists when needed. |
nielsdrost7
left a comment
There was a problem hiding this comment.
@copilot make a special log and also show in the screen when 1 of the steps is whining about package-lock.json. isn't yarn.lock enough?
Also better reflect the choices.
- I think a "security updates" could be a good choice
- "upgrade all to latest and build production" could be a good choice
…ptions - Add package-lock.json conflict detection with warnings - Add 'security-updates' option (new default for scheduled runs) - Rename 'all-dependencies' to 'all-latest-with-build' for clarity - Add comprehensive logging for all update steps - Display lockfile conflict warnings in PR body - Security updates now identify and upgrade vulnerable packages - Improved screen output with clear section separators Co-authored-by: nielsdrost7 <47660417+nielsdrost7@users.noreply.github.com>
... Fixed in commit 233a635. Changes made to yarn-update.yml:
The workflow will now warn about package-lock.json whenever it runs, and the PR description will include a checklist item to remove it if not needed. |
Vite build fails because CSS files import from
vendor/filament/*paths beforecomposer installruns in the release workflow. The workflow was executingyarn buildthencomposer install, causing path resolution errors.Changes
Reordered release workflow build steps:
vendordirectory with Filament CSS files exists whenyarn buildexecutesWorkflow order changed from:
To:
Enhanced yarn-update workflow:
security-updates(default),common-packages,patch-minor,all-latest-with-buildThe build now works correctly because the vendor directory with all Filament CSS files exists when Vite tries to resolve the import statements during the build process. The yarn-update workflow now provides better visibility and handles package manager conflicts gracefully.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.