Skip to content

Fix Vite build failure and enhance yarn-update workflow#292

Merged
nielsdrost7 merged 4 commits into
developfrom
copilot/sub-pr-282-again
Dec 29, 2025
Merged

Fix Vite build failure and enhance yarn-update workflow#292
nielsdrost7 merged 4 commits into
developfrom
copilot/sub-pr-282-again

Conversation

Copilot AI commented Dec 29, 2025

Copy link
Copy Markdown
Contributor

Vite build fails because CSS files import from vendor/filament/* paths before composer install runs in the release workflow. The workflow was executing yarn build then composer install, causing path resolution errors.

Changes

Reordered release workflow build steps:

  • Moved PHP setup and Composer installation to run before Node.js setup and frontend build
  • Ensures vendor directory with Filament CSS files exists when yarn build executes
  • CSS vendor imports remain unchanged and functional

Workflow order changed from:

  1. Node.js setup
  2. Yarn install
  3. Yarn build ❌ (fails - vendor doesn't exist)
  4. PHP setup
  5. Composer install

To:

  1. PHP setup
  2. Composer install (creates vendor directory)
  3. Node.js setup
  4. Yarn install
  5. Yarn build ✅ (succeeds - vendor exists)

Enhanced yarn-update workflow:

  • Added package-lock.json conflict detection with prominent warnings
  • New update type options: security-updates (default), common-packages, patch-minor, all-latest-with-build
  • Security updates now identify and upgrade vulnerable packages from audit reports
  • Improved logging with clear section separators for all steps
  • Lock file conflict warnings displayed in PR body with remediation checklist
  • Build step shows completion confirmation

The 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.

@coderabbitai

coderabbitai Bot commented Dec 29, 2025

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

- 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>
Copilot AI changed the title [WIP] Merge development branch into master Fix Vite build failure from vendor CSS imports Dec 29, 2025
Copilot AI requested a review from nielsdrost7 December 29, 2025 16:16

@nielsdrost7 nielsdrost7 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@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>

Copilot AI commented Dec 29, 2025

Copy link
Copy Markdown
Contributor Author

@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 *...

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 composer install before yarn build:

New order:

  1. PHP setup
  2. Composer install (creates vendor directory)
  3. Node.js setup
  4. Yarn install
  5. Yarn build (can now resolve vendor CSS imports)

The CSS vendor imports are back to their original state, and the build will work correctly now that the vendor directory exists when needed.

Copilot AI changed the title Fix Vite build failure from vendor CSS imports Fix Vite build failure by reordering workflow steps Dec 29, 2025
Copilot AI requested a review from nielsdrost7 December 29, 2025 16:24

@nielsdrost7 nielsdrost7 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@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>

Copilot AI commented Dec 29, 2025

Copy link
Copy Markdown
Contributor Author

@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.

...

Fixed in commit 233a635.

Changes made to yarn-update.yml:

  1. Package-lock.json detection and warnings:

    • New step logs warnings when package-lock.json exists alongside yarn.lock
    • Shows file modification date and explains the conflict
    • Warnings appear in both workflow logs and PR descriptions
  2. Better update type choices:

    • Added security-updates (new default for scheduled runs)
    • Kept common-packages and patch-minor
    • Renamed all-dependencies to all-latest-with-build for clarity
  3. Enhanced logging:

    • All steps now have clear section separators (=========)
    • Security updates identify and upgrade vulnerable packages
    • Build step shows completion confirmation

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.

Copilot AI changed the title Fix Vite build failure by reordering workflow steps Fix Vite build failure and enhance yarn-update workflow Dec 29, 2025
Copilot AI requested a review from nielsdrost7 December 29, 2025 16:32
@nielsdrost7 nielsdrost7 marked this pull request as ready for review December 29, 2025 17:07
@nielsdrost7 nielsdrost7 merged commit 5d3fbbb into develop Dec 29, 2025
1 check passed
@nielsdrost7 nielsdrost7 deleted the copilot/sub-pr-282-again branch December 29, 2025 17:07
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