-
Notifications
You must be signed in to change notification settings - Fork 14
feat(cms): add vite config and compression middleware #8643
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
base: main
Are you sure you want to change the base?
Conversation
- Add Vite configuration with optimized chunk splitting for CMS admin - Add compression middleware to Strapi config - Add hls.js version override in package.json - Replace vite.config.example.ts with vite.config.ts Refs: AI-8
WalkthroughThis PR introduces compression middleware for the CMS, upgrades the Docker base image from Alpine to Debian with updated system dependencies and restructured build stages, replaces Docker Actions with useblacksmith alternatives across multiple CI/CD workflows, adds concurrency controls to prevent workflow conflicts, configures hls.js dependency override, and enables npm workspace package injection. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
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. Comment |
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run journeys-admin-e2e:e2e |
❌ Failed | 2m 1s | View ↗ |
nx run watch-e2e:e2e |
✅ Succeeded | 27s | View ↗ |
nx run videos-admin-e2e:e2e |
✅ Succeeded | 6s | View ↗ |
nx run journeys-e2e:e2e |
✅ Succeeded | 27s | View ↗ |
nx run watch-modern-e2e:e2e |
✅ Succeeded | 5s | View ↗ |
nx run resources-e2e:e2e |
✅ Succeeded | 15s | View ↗ |
nx run short-links-e2e:e2e |
✅ Succeeded | 3s | View ↗ |
nx run player-e2e:e2e |
✅ Succeeded | 4s | View ↗ |
Additional runs (28) |
✅ Succeeded | ... | View ↗ |
☁️ Nx Cloud last updated this comment at 2026-01-27 20:09:32 UTC
|
The latest updates on your projects.
|
|
The latest updates on your projects.
|
|
The latest updates on your projects.
|
|
The latest updates on your projects.
|
|
The latest updates on your projects.
|
|
The latest updates on your projects.
|
|
The latest updates on your projects.
|
- Eliminated the manual chunk splitting logic for vendor libraries in the Vite configuration to simplify the build process.
- Eliminated concurrency configurations from production and staging deployment workflows to simplify the setup.
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: 1
🤖 Fix all issues with AI agents
In `@apps/cms/Dockerfile`:
- Around line 31-36: The build fails because pnpm deploy --prod excludes
devDependencies, but strapi build (triggered by RUN ["npm", "run", "build"])
needs TypeScript to parse vite.config.ts. In the Dockerfile section containing
pnpm deploy --prod --filter cms ./apps/cms/deploy and WORKDIR
/app/apps/cms/deploy, remove the --prod flag from the pnpm deploy command so
TypeScript is included, or move typescript from devDependencies to dependencies
in the cms package to ensure it’s present during the Docker build.
| RUN --mount=type=cache,id=pnpm-store,target=/root/.local/share/pnpm/store \ | ||
| pnpm deploy --prod --filter cms ./apps/cms/deploy | ||
|
|
||
| RUN chown -R node:node /opt/apps/cms | ||
| USER node | ||
| WORKDIR /app/apps/cms/deploy | ||
|
|
||
| RUN ["npm", "run", "build"] |
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.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check package.json in apps/cms for dependency placement
echo "=== Finding package.json files ==="
find apps/cms -maxdepth 2 -name "package.json" -type f
echo ""
echo "=== Content of apps/cms/package.json ==="
if [ -f "apps/cms/package.json" ]; then
cat apps/cms/package.json | jq '.' | head -100
fiRepository: JesusFilm/core
Length of output: 1145
🏁 Script executed:
#!/bin/bash
# Check if vite.config.ts exists and examine full Dockerfile
echo "=== Searching for vite.config.ts ==="
find apps/cms -name "vite.config.ts" -o -name "vite.config.js"
echo ""
echo "=== Full Dockerfile content ==="
cat apps/cms/Dockerfile
echo ""
echo "=== Checking if strapi build requires vite ==="
grep -r "vite" apps/cms --include="*.json" --include="*.ts" --include="*.js" || echo "No vite references found"Repository: JesusFilm/core
Length of output: 1365
Move typescript to dependencies or remove --prod flag from pnpm deploy.
The pnpm deploy --prod command excludes devDependencies, but strapi build needs TypeScript to parse vite.config.ts. Since TypeScript is currently in devDependencies only, the build will fail in the Docker container. Either move typescript to dependencies or use pnpm deploy --filter cms ./apps/cms/deploy without the --prod flag.
🤖 Prompt for AI Agents
In `@apps/cms/Dockerfile` around lines 31 - 36, The build fails because pnpm
deploy --prod excludes devDependencies, but strapi build (triggered by RUN
["npm", "run", "build"]) needs TypeScript to parse vite.config.ts. In the
Dockerfile section containing pnpm deploy --prod --filter cms ./apps/cms/deploy
and WORKDIR /app/apps/cms/deploy, remove the --prod flag from the pnpm deploy
command so TypeScript is included, or move typescript from devDependencies to
dependencies in the cms package to ensure it’s present during the Docker build.

Changes
Files Changed
apps/cms/config/middlewares.ts- Added compression middlewareapps/cms/src/admin/vite.config.ts- New Vite config with manual chunk splittingapps/cms/src/admin/vite.config.example.ts- Removed (replaced by vite.config.ts)package.json- Added hls.js overridepnpm-lock.yaml- Updated dependenciesRefs: AI-8
Summary by CodeRabbit
New Features
Refactor
Chores
Style
✏️ Tip: You can customize this high-level summary in your review settings.