Bug Report
Summary
Both SPA entry points fail to mount because the webpack runtime chunk (softwarecatalog-runtime.js) is not registered in the PHP templates. Without the runtime, __webpack_require__ is never bootstrapped, and all modules pushed to self.webpackChunksoftwarecatalog[] are never executed.
Affected templates
templates/index.php — loads only softwarecatalog-main
templates/settings/admin.php — loads only softwarecatalog-settings
Root cause
@nextcloud/webpack-vue-config extracts a separate runtime chunk (softwarecatalog-runtime.js). Both entry-point bundles start with:
(self.webpackChunksoftwarecatalog=self.webpackChunksoftwarecatalog||[]).push(...)
They push module definitions into the chunk array but never call __webpack_require__ themselves — that bootstrap lives exclusively in the runtime. Without it the Vue app never initialises and both <div id="softwarecatalog"> and <div id="settings"> remain empty.
Additional issue
The runtime chunk has n.p="/apps/softwarecatalog/js/" as the webpack public path, but the app is installed under /custom_apps/softwarecatalog/. Dynamic imports of further split chunks (e.g. lazy routes) will produce 404s even after the runtime is loaded.
Expected fix
In templates/index.php:
Util::addScript($appId, $appId . '-runtime');
Util::addScript($appId, $appId . '-shared-vendor');
Util::addScript($appId, $appId . '-shared-nc-vue');
Util::addScript($appId, $appId . '-main');
In templates/settings/admin.php:
Util::addScript($appId, $appId . '-runtime');
Util::addScript($appId, $appId . '-shared-vendor');
Util::addScript($appId, $appId . '-shared-nc-vue');
Util::addScript($appId, $appId . '-settings');
Also fix the webpack output.publicPath in webpack.config.js to use /custom_apps/softwarecatalog/js/.
Reproduction
- Enable the softwarecatalog app (
v0.2.0)
- Navigate to
/index.php/apps/softwarecatalog
- The app content div (
<div id="softwarecatalog">) remains empty — no navigation, no content
- Navigate to
/index.php/settings/admin/softwarecatalog
- The settings div (
<div id="settings">) is never populated by the Vue component
Impact
Gate-19 e2e-coverage cannot be satisfied for the org-archimate-export frontend scenarios (user-triggers-organization-export-with-toggles, no-organization-selected, default-checkbox-state, export-button-shows-loading-state-during-download) as the ArchiMate settings section does not render.
Bug Report
Summary
Both SPA entry points fail to mount because the webpack runtime chunk (
softwarecatalog-runtime.js) is not registered in the PHP templates. Without the runtime,__webpack_require__is never bootstrapped, and all modules pushed toself.webpackChunksoftwarecatalog[]are never executed.Affected templates
templates/index.php— loads onlysoftwarecatalog-maintemplates/settings/admin.php— loads onlysoftwarecatalog-settingsRoot cause
@nextcloud/webpack-vue-configextracts a separate runtime chunk (softwarecatalog-runtime.js). Both entry-point bundles start with:They push module definitions into the chunk array but never call
__webpack_require__themselves — that bootstrap lives exclusively in the runtime. Without it the Vue app never initialises and both<div id="softwarecatalog">and<div id="settings">remain empty.Additional issue
The runtime chunk has
n.p="/apps/softwarecatalog/js/"as the webpack public path, but the app is installed under/custom_apps/softwarecatalog/. Dynamic imports of further split chunks (e.g. lazy routes) will produce 404s even after the runtime is loaded.Expected fix
In
templates/index.php:In
templates/settings/admin.php:Also fix the webpack
output.publicPathinwebpack.config.jsto use/custom_apps/softwarecatalog/js/.Reproduction
v0.2.0)/index.php/apps/softwarecatalog<div id="softwarecatalog">) remains empty — no navigation, no content/index.php/settings/admin/softwarecatalog<div id="settings">) is never populated by the Vue componentImpact
Gate-19 e2e-coverage cannot be satisfied for the
org-archimate-exportfrontend scenarios (user-triggers-organization-export-with-toggles, no-organization-selected, default-checkbox-state, export-button-shows-loading-state-during-download) as the ArchiMate settings section does not render.