Skip to content

Align Rollup output filename with enqueued asset (sirus-context.js) - #141

Merged
MaximillianGroup merged 1 commit into
mainfrom
codex/fix-javascript-build-filename-mismatch
Aug 10, 2026
Merged

Align Rollup output filename with enqueued asset (sirus-context.js)#141
MaximillianGroup merged 1 commit into
mainfrom
codex/fix-javascript-build-filename-mismatch

Conversation

@MaximillianGroup

Copy link
Copy Markdown
Contributor

Motivation

  • Production and dev Rollup builds were emitting assets/js/sparxstar-user-environment-check-app.bundle.min.js while PHP enqueues assets/js/sirus-context.js, causing the front-end bundle to be missing at runtime.
  • Ensure build outputs and the PHP asset manager use the same canonical bundle name so the plugin loads correctly in both dev and prod.

Description

  • Updated roll-up.config.mjs to set the production output file to assets/js/sirus-context.js instead of the old bundle name.
  • Updated roll-up.config.dev.mjs to set the development output file to assets/js/sirus-context.js to match the PHP enqueue path.
  • Rebuilt the JS bundle so assets/js/sirus-context.js is present and consistent with the PHP enqueue logic in the plugin.

Testing

  • Ran pnpm run build:js and the Rollup build produced assets/js/sirus-context.js successfully (PASS).
  • Ran pnpm run validate which completed successfully and verified the expected JS/CSS files (PASS).
  • Ran git diff --check and local style/validate checks; no new issues detected (PASS).
  • Attempted composer install --no-interaction --prefer-dist to prepare PHP tooling and run PHP gates, but dependency installation failed due to inability to fetch private starisian/sparxstar-ouroboros-integrity (HTTP 404 and SSH network errors), blocking Composer-based verification (FAIL: dependency gate).
  • Because Composer deps could not be installed, the requested PHP verification gates could not be executed: vendor/bin/phpunit, vendor/bin/phpstan, vendor/bin/phpcs, composer run smoke:api-contract, and composer run check:ouroboros-drift were not run and remain pending until the dependency/access issue is resolved (NOT RUN).

Codex Task

@amazon-q-developer amazon-q-developer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

@MaximillianGroup
MaximillianGroup merged commit c8458ae into main Aug 10, 2026
15 of 21 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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

Comment thread roll-up.config.mjs
Comment on lines 9 to 12
output: {
file: 'assets/js/sparxstar-user-environment-check-app.bundle.min.js',
file: 'assets/js/sirus-context.js',
format: 'iife',
name: 'SparxstarUserEnvironmentCheckApp',
Comment thread roll-up.config.dev.mjs
Comment on lines 8 to 12
output: {
file: 'assets/js/sparxstar-user-environment-check-app.bundle.min.js',
file: 'assets/js/sirus-context.js',
format: 'iife',
name: 'SparxstarUserEnvironmentCheckApp',
sourcemap: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants