Skip to content

fix(admin): restore webpack build on Shopware 6.6 - #480

Merged
shyim merged 2 commits into
FriendsOfShopware:mainfrom
M-arcus:fix-watcher-script-6.6
Oct 8, 2026
Merged

shyim merged 2 commits into
FriendsOfShopware:mainfrom
M-arcus:fix-watcher-script-6.6

Conversation

@M-arcus

@M-arcus M-arcus commented Oct 8, 2026

Copy link
Copy Markdown
Member

1. Why is this change necessary?

Since 3.15.0, the webpack build of the FroshTools administration fails on Shopware 6.6 with 8 errors. Any build that compiles the plugin source is affected, for example shopware-cli project admin-watch or bin/watch-administration.sh. There are two causes.

Module not found: Error: Can't resolve '../../acl/privileges' in '.../component/frosh-tools-health-status'
Did you mean 'privileges.js'?
BREAKING CHANGE: The request '../../acl/privileges' failed to resolve only because it was resolved as fully specified

Module not found: Error: Can't resolve 'process/browser' in '.../administration/node_modules/kleur'

2. What does this change do, exactly?

  • Adds .js to the relative imports in frosh-tools-health-status/index.js, frosh-tools-tab-apps/index.js, overrides/sw-admin-menu/index.js and overrides/sw-version/index.js.
  • Adds src/Resources/app/administration/build/webpack.config.cjs. It aliases process/browser$ to the administration's own process/browser.js, resolved from the webpack working directory. An absolute path also satisfies fully specified ESM. The file uses .cjs because the package is "type": "module". Shopware's BundleConfigGenerator and shopware-cli both detect build/webpack.config.cjs. The Vite build on 6.7 ignores the file.

"type": "module" stays in place.

3. Describe each step to reproduce the issue or behaviour.

  1. Set up a Shopware 6.6 project, which builds the administration with webpack, and install FroshTools 3.15.0.
  2. Run shopware-cli project admin-watch. It installs the plugin's npm dependencies and compiles the plugin source.
  3. Before: webpack stops with 8 errors. Four are "fully specified" import errors, two are process/browser errors, and two are the resulting Cannot read properties of undefined (reading 'module') errors.
  4. After: webpack logs # Plugin "FroshTools": Extends the webpack config successfully and compiles without errors.

Shopware 6.7 builds the administration with Vite and is not affected.

4. Please link to the relevant issues (if any).

Follow-up to #471 (#468). The extensionless imports came back in #465 and #467.

@greptile-apps

greptile-apps Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[High risk] Adds webpack build configuration and CI step for admin panel.

The PR appears safe to merge, with no outstanding findings.

Summary

This PR restores webpack support on Shopware 6.6.

  • Adds .js to four relative imports.
  • Maps process/browser to the administration’s installed copy.
  • Adds an import check and a Shopware 6.6 webpack build in CI.
  • Addresses the previous request for automated build coverage.

Reviews (2) · Last reviewed commit: "fix(admin): fix greptile comments and cs" · Reviewed by Greptile

Comment thread src/Resources/app/administration/build/webpack.config.cjs Outdated
@shyim
shyim merged commit 40f39f7 into FriendsOfShopware:main Oct 8, 2026
8 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