chore(deps): upgrade webpack-encore 5 -> 6, hold webpack-cli at 6#283
Conversation
Bump @symfony/webpack-encore from ^5.2.0 to ^6.0.0 and webpack-cli from ^5.1.4 to ^7.0.0. Both production (npm run build) and dev (npm run dev) builds compile cleanly with no deprecation warnings; manifest.json and entrypoints.json are emitted as expected. Encore 6 raises the Node.js floor to 22.13.0 (the dev container ships 22.22.2) and removes the unmaintained file-loader internal dep along with deprecated --https / [N] copyFiles placeholders. Our webpack.config.js does not use any of those, so no config change is required. Drop the now-unused file-loader from devDependencies because it was only declared to satisfy Encore 5's internal contract. webpack-cli 7 is mostly transparent for projects that do not consume the programmatic CLI API; encore wraps the binary, so no script change is needed. Encore 6 declares webpack-cli ^6 as its peer, but we already install with --legacy-peer-deps (per the canonical npm-install make target) so the v7 bump installs cleanly without altering peer resolution behaviour. Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
There was a problem hiding this comment.
Code Review
This pull request upgrades @symfony/webpack-encore to version 6.0.0 and webpack-cli to version 7.0.0, removes the deprecated file-loader, and updates several internal dependencies. Feedback identifies a peer dependency mismatch where @symfony/webpack-encore requires webpack-cli version 6, recommending a downgrade to ensure dependency tree stability and avoid potential future incompatibilities.
There was a problem hiding this comment.
Pull request overview
This PR upgrades the project’s Webpack Encore toolchain to the latest major versions, aligning the frontend build dependencies with Encore 6’s ecosystem and removing an unused loader dependency.
Changes:
- Bump
@symfony/webpack-encorefrom^5.2.0to^6.0.0. - Bump
webpack-clifrom^5.1.4to^7.0.0. - Remove
file-loaderfrom dependencies and refresh the lockfile accordingly.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| package.json | Updates Encore/webpack-cli versions and removes file-loader. |
| package-lock.json | Lockfile updates reflecting the dependency graph changes from the upgrades/removal. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #283 +/- ##
=========================================
Coverage 81.49% 81.49%
Complexity 2579 2579
=========================================
Files 172 172
Lines 7107 7107
=========================================
Hits 5792 5792
Misses 1315 1315
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Encore 6 declares webpack-cli ^6 as its peer; pinning to ^7 only worked under --legacy-peer-deps and risked drift if Encore later relied on v6-specific behaviour. webpack-cli 7's only practical changes vs 6 (dynamic-import config loader, --node-env → --config-node-env) are unused here, so v6 is functionally equivalent and resolves cleanly. Also pin engines.node to encore 6's declared floor (^22.13.0 || >=24) so plain `npm install` fails fast on too-old Node instead of mid-build. Addresses review feedback from copilot-pull-request-reviewer and gemini-code-assist on PR #283. Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
|



Summary
@symfony/webpack-encorefrom^5.2.0to^6.0.0.webpack-cliat^6.0.0(kept aligned with Encore 6's declared peer dependency). The originally-proposed bump to^7.0.0was reverted during review — webpack-cli 7's only practical changes vs 6 (dynamic-import config loader,--node-envrename) are unused in this project, and pinning to ^6 avoids the brittle--legacy-peer-depsworkaround for the peer-dep mismatch.file-loaderfromdevDependencies: Encore 6 removed the unmaintained internal dep, and ourwebpack.config.jsnever imported it directly (we only useEncore.copyFiles()).engines.node = ^22.13.0 || >=24.0.0so plainnpm installfails fast on too-old Node instead of mid-build.webpack.config.jschanges required: our config does not use any of the APIs Encore 6 deprecated/removed (--httpsflag,[N]regex placeholders incopyFiles()filenames,version: 2Vue, etc.).Why
Encore 6 release notes raise the Node floor to 22.13.0 (CI/dev container runs 22.22.2), bump major loaders (sass-loader 16, postcss-loader 8, less-loader 12, etc. — already aligned), and remove
file-loader.Test plan
docker compose run --rm app-dev npm install --legacy-peer-deps— clean, 0 vulnerabilities.docker compose run --rm app-dev npm run build— production build compiles cleanly, 2106 assets emitted, no deprecation/warning output.docker compose run --rm app-dev npm run dev— dev build compiles cleanly, 2100 assets emitted.public/build/manifest.jsonandpublic/build/entrypoints.jsonare well-formed.