fix: load shared webpack chunks before main/settings entries#37
Merged
Conversation
…Vue-mount failure) webpack.config.js uses splitChunks with `enforce: true` cacheGroups that emit two shared chunks (`<appId>-shared-vendor`, `<appId>-shared-nc-vue`). The main and adminSettings entry bundles wrap their Vue mount in `__webpack_require__.O(0, [shared chunks], …)`, which only fires once every listed chunk has registered itself on `self.webpackChunk<appId>`. With only the entry script in `addScript()`, the shared chunks never load, the mount callback never fires, and the app silently renders nothing. Mirrors the canonical fix in zaakafhandelapp#206. ExampleWidget.php already loaded the shared chunks correctly; this brings the page and admin-settings templates into line. Because this is the scaffold template, every newly-generated app inherits the fix.
Contributor
Quality Report — ConductionNL/nextcloud-app-template @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| composer | ✅ | ✅ 100/100 | |||
| npm | ✅ | ✅ 428/428 | |||
| PHPUnit | ✅ | ||||
| Newman | ✅ | ||||
| Playwright | ⏭️ |
Coverage: 0% (0/3 statements)
Quality workflow — 2026-05-13 09:22 UTC
Download the full PDF report from the workflow artifacts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
webpack.config.jsuses splitChunks withenforce: truecacheGroups that emit two shared chunks (<appId>-shared-vendor,<appId>-shared-nc-vue). The main and adminSettings entry bundles wrap their Vue mount in__webpack_require__.O(0, [shared chunks], …), which only fires once every listed chunk has registered itself onself.webpackChunk<appId>. With only the entry script inaddScript(), the shared chunks never load, the mount callback never fires, and the app silently renders nothing inside the existing#contentwrapper.Why this matters
This is the scaffold template — every newly-generated app inherits the bug. The fleet-wide audit caught this on zaakafhandelapp#206; nat has the same
splitChunks+enforce: truepattern but never updated itstemplates/index.php/templates/settings/admin.phpto match.lib/Dashboard/ExampleWidget.phpalready loaded the shared chunks correctly; this PR brings the page and admin-settings templates into line.How
Register every chunk produced by splitChunks in dependency order before the entry script. Mirrors the canonical fix in zaakafhandelapp#206.