Skip to content

Automate widget stylesheet generation during deployment #30

Description

@digitalrisedorset

Summary

The deployment pipeline currently assumes that each widget's compiled stylesheet has already been generated.

If the stylesheet build step is skipped, deployment succeeds but the published registry references CSS assets that do not exist, leading to runtime 404 responses and degraded rendering.

Problem

Widget styles are generated independently of the deployment process.

This allows a deployment to publish incomplete assets where:

  • JavaScript bundles are available.
  • The widget registry is generated correctly.
  • The compiled stylesheet has not been produced.
  • The deployment completes successfully.

The widget still loads, but without its intended styling.

Proposed Solution

The deployment pipeline should automatically generate the compiled stylesheet for every widget before publishing assets.

The deployment should become:

Widget
    ↓
Build JavaScript
    ↓
Build Stylesheet
    ↓
Publish Assets
    ↓
Generate Registry

The deployment should not rely on a previous manual stylesheet build.

Future Enhancement

Widgets should degrade gracefully when their stylesheet cannot be loaded. Missing CSS should not prevent the widget from functioning, although the deployment pipeline should make this situation unlikely by generating the stylesheet automatically.

Acceptance Criteria

  • Stylesheets are generated automatically during deployment.
  • No manual stylesheet build step is required.
  • Published assets always include the referenced CSS bundle.
  • Deployments remain deterministic and reproducible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions