Skip to content

Resolve vite build warning in embed folder#3803

Merged
ildyria merged 1 commit intoLycheeOrg:masterfrom
cdzombak:cdz/resolve-vite-build-warning
Nov 14, 2025
Merged

Resolve vite build warning in embed folder#3803
ildyria merged 1 commit intoLycheeOrg:masterfrom
cdzombak:cdz/resolve-vite-build-warning

Conversation

@cdzombak
Copy link
Copy Markdown
Contributor

@cdzombak cdzombak commented Nov 13, 2025

This PR resolves the following warning:

▶ npm run build:embed       

> build:embed
> vite build --config vite.embed.config.ts

vite v7.1.11 building for production...
✓ 29 modules transformed.

(!) The public directory feature may not work correctly. outDir /home/biv/Documents/Projects/Lychee/public/embed and publicDir /home/biv/Documents/Projects/Lychee/public are not separate folders.

Summary by CodeRabbit

  • Chores
    • Updated build configuration for embedded deployments to optimize public file handling.

@cdzombak cdzombak requested a review from a team as a code owner November 13, 2025 23:22
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Nov 13, 2025

📝 Walkthrough

Walkthrough

A new configuration option publicDir: false is added to the Vite embed configuration file, adjusting how the public directory is processed during the build step. This is a single-line modification to the exported Vite config object.

Changes

Cohort / File(s) Change Summary
Vite Configuration
vite.embed.config.ts
Adds publicDir: false property to the Vite config, disabling public directory handling during build

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

This is a straightforward configuration flag addition with minimal scope and no complex logic changes.

Poem

A single line hops into place, 🐰
publicDir bows out of the race,
No assets scattered wide and far,
Vite config cleaner than a star! ✨

Pre-merge checks

✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4adf845 and b19df25.

📒 Files selected for processing (1)
  • vite.embed.config.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

**/*.{vue,ts,tsx}: Do not use await for async calls in Vue code; use .then() instead
Do not use const function = () => {}; prefer named function declarations (function myFn() {})

Files:

  • vite.embed.config.ts
⏰ Context from checks skipped due to timeout of 180000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (17)
  • GitHub Check: 3️⃣ PHP dist / 8.4 - postgresql
  • GitHub Check: 3️⃣ PHP dist / 8.3 - sqlite
  • GitHub Check: 3️⃣ PHP dist / 8.4 - sqlite
  • GitHub Check: 3️⃣ PHP dist / 8.4 - mariadb
  • GitHub Check: 3️⃣ PHP dist / 8.3 - postgresql
  • GitHub Check: 3️⃣ PHP dist / 8.3 - mariadb
  • GitHub Check: 2️⃣ PHP tests / 8.4 - mariadb -- Install
  • GitHub Check: 2️⃣ PHP tests / 8.3 - sqlite -- Webshop
  • GitHub Check: 2️⃣ PHP tests / 8.3 - sqlite -- Unit
  • GitHub Check: 2️⃣ PHP tests / 8.4 - postgresql -- Install
  • GitHub Check: 2️⃣ PHP tests / 8.3 - sqlite -- Feature_v2
  • GitHub Check: 2️⃣ PHP tests / 8.3 - postgresql -- Webshop
  • GitHub Check: 2️⃣ PHP tests / 8.3 - mariadb -- Feature_v2
  • GitHub Check: 2️⃣ PHP tests / 8.3 - mariadb -- Unit
  • GitHub Check: 2️⃣ PHP tests / 8.3 - postgresql -- Feature_v2
  • GitHub Check: 2️⃣ PHP tests / 8.3 - postgresql -- Unit
  • GitHub Check: 2️⃣ PHP tests / 8.3 - mariadb -- Webshop
🔇 Additional comments (1)
vite.embed.config.ts (1)

18-18: Configuration change verified—please confirm build executes without warnings in your environment.

The publicDir: false setting on line 18 is correctly placed and properly disables Vite's public directory feature. This resolves the warning about outDir (public/embed) conflicting with the default publicDir (public). The configuration is appropriate for a standalone embeddable UMD widget with bundled dependencies.

Manual verification needed:

Please run the embed build in your local or CI environment to confirm:

  1. Build completes without Vite warnings
  2. Output artifacts are generated in public/embed/
  3. The embed widget functions correctly on target pages

The sandbox environment lacks Vite and dependencies needed to run the build verification script, so this must be confirmed in your development environment.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@codecov
Copy link
Copy Markdown

codecov bot commented Nov 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.44%. Comparing base (45bee73) to head (b19df25).
⚠️ Report is 2 commits behind head on master.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ildyria ildyria enabled auto-merge (squash) November 14, 2025 07:17
@ildyria ildyria merged commit fad833e into LycheeOrg:master Nov 14, 2025
35 checks passed
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