Skip to content

chore(deps): upgrade webpack-encore 5 -> 6, hold webpack-cli at 6#283

Merged
CybotTM merged 2 commits into
mainfrom
chore/upgrade-webpack-encore-6
May 8, 2026
Merged

chore(deps): upgrade webpack-encore 5 -> 6, hold webpack-cli at 6#283
CybotTM merged 2 commits into
mainfrom
chore/upgrade-webpack-encore-6

Conversation

@CybotTM
Copy link
Copy Markdown
Member

@CybotTM CybotTM commented May 6, 2026

Summary

  • Bump @symfony/webpack-encore from ^5.2.0 to ^6.0.0.
  • Hold webpack-cli at ^6.0.0 (kept aligned with Encore 6's declared peer dependency). The originally-proposed bump to ^7.0.0 was reverted during review — webpack-cli 7's only practical changes vs 6 (dynamic-import config loader, --node-env rename) are unused in this project, and pinning to ^6 avoids the brittle --legacy-peer-deps workaround for the peer-dep mismatch.
  • Drop now-unused file-loader from devDependencies: Encore 6 removed the unmaintained internal dep, and our webpack.config.js never imported it directly (we only use Encore.copyFiles()).
  • Add engines.node = ^22.13.0 || >=24.0.0 so plain npm install fails fast on too-old Node instead of mid-build.
  • No webpack.config.js changes required: our config does not use any of the APIs Encore 6 deprecated/removed (--https flag, [N] regex placeholders in copyFiles() filenames, version: 2 Vue, 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.
  • Verified public/build/manifest.json and public/build/entrypoints.json are well-formed.
  • CI green.

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>
Copilot AI review requested due to automatic review settings May 6, 2026 12:13
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

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.

Comment thread package.json Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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-encore from ^5.2.0 to ^6.0.0.
  • Bump webpack-cli from ^5.1.4 to ^7.0.0.
  • Remove file-loader from 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.

Comment thread package.json
Comment thread package.json Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.49%. Comparing base (0d4c52f) to head (7640505).
⚠️ Report is 6 commits behind head on main.

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           
Flag Coverage Δ
integration 47.47% <ø> (ø)
unit 50.56% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

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>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 8, 2026

@CybotTM CybotTM merged commit 1bc5ebc into main May 8, 2026
24 checks passed
@CybotTM CybotTM deleted the chore/upgrade-webpack-encore-6 branch May 8, 2026 09:28
@CybotTM CybotTM changed the title chore(deps): upgrade webpack-encore 5 -> 6 and webpack-cli 5 -> 7 chore(deps): upgrade webpack-encore 5 -> 6, hold webpack-cli at 6 May 8, 2026
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