Align Rollup output filename with enqueued asset (sirus-context.js) - #141
Conversation
There was a problem hiding this comment.
The changes correctly align the Rollup output filenames with the PHP enqueued asset path (sirus-context.js). Both development and production configurations have been updated consistently. No blocking issues identified - the implementation is correct and ready for merge.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
There was a problem hiding this comment.
Pull request overview
This PR updates the Rollup build outputs so the emitted front-end JS bundle filename matches the WordPress enqueue path (assets/js/sirus-context.js), preventing missing-asset runtime failures.
Changes:
- Updated production Rollup config to emit
assets/js/sirus-context.js. - Updated development Rollup config to emit
assets/js/sirus-context.js.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| roll-up.config.mjs | Renames the production Rollup output file to the canonical assets/js/sirus-context.js. |
| roll-up.config.dev.mjs | Renames the dev Rollup output file to the canonical assets/js/sirus-context.js. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
| output: { | ||
| file: 'assets/js/sparxstar-user-environment-check-app.bundle.min.js', | ||
| file: 'assets/js/sirus-context.js', | ||
| format: 'iife', | ||
| name: 'SparxstarUserEnvironmentCheckApp', |
| output: { | ||
| file: 'assets/js/sparxstar-user-environment-check-app.bundle.min.js', | ||
| file: 'assets/js/sirus-context.js', | ||
| format: 'iife', | ||
| name: 'SparxstarUserEnvironmentCheckApp', | ||
| sourcemap: true |
Motivation
assets/js/sparxstar-user-environment-check-app.bundle.min.jswhile PHP enqueuesassets/js/sirus-context.js, causing the front-end bundle to be missing at runtime.Description
roll-up.config.mjsto set the production outputfiletoassets/js/sirus-context.jsinstead of the old bundle name.roll-up.config.dev.mjsto set the development outputfiletoassets/js/sirus-context.jsto match the PHP enqueue path.assets/js/sirus-context.jsis present and consistent with the PHP enqueue logic in the plugin.Testing
pnpm run build:jsand the Rollup build producedassets/js/sirus-context.jssuccessfully (PASS).pnpm run validatewhich completed successfully and verified the expected JS/CSS files (PASS).git diff --checkand local style/validate checks; no new issues detected (PASS).composer install --no-interaction --prefer-distto prepare PHP tooling and run PHP gates, but dependency installation failed due to inability to fetch privatestarisian/sparxstar-ouroboros-integrity(HTTP 404 and SSH network errors), blocking Composer-based verification (FAIL: dependency gate).vendor/bin/phpunit,vendor/bin/phpstan,vendor/bin/phpcs,composer run smoke:api-contract, andcomposer run check:ouroboros-driftwere not run and remain pending until the dependency/access issue is resolved (NOT RUN).Codex Task