Skip to content

chore(components): update @embroider/addon-dev v8#3474

Closed
aklkv wants to merge 1 commit intomainfrom
chore/addon-dev
Closed

chore(components): update @embroider/addon-dev v8#3474
aklkv wants to merge 1 commit intomainfrom
chore/addon-dev

Conversation

@aklkv
Copy link
Collaborator

@aklkv aklkv commented Jan 13, 2026

📌 Summary

This PR updates the @hashicorp/design-system-components build to be compatible with
@embroider/addon-dev v8 by removing our reliance on rollup-plugin-scss and the
previous Rollup output behavior that only worked due to an Embroider bug.

What changed

  • Replaced rollup-plugin-scss with a small Rollup “sidecar” plugin that:
    • Copies src/styles/**dist/styles/** late in the build (during writeBundle)
    • Compiles our SCSS entrypoints to CSS using sass and writes them next to the
      published SCSS:
      • dist/styles/@hashicorp/design-system-components.css
      • dist/styles/@hashicorp/design-system-power-select-overrides.css
  • Removed the SCSS entry from addon.publicEntrypoints() since styles are now published
    via explicit copying instead of Rollup’s module graph.
  • Updated package.json exports to explicitly support existing consumer import paths:
    • @hashicorp/design-system-components.css
    • @hashicorp/design-system-power-select-overrides.{css,scss}
    • (optionally) deep style imports via ./styles/* mappings

Why it was needed

With @embroider/addon-dev v8, Rollup output handling is stricter and no longer allows
emitting files into arbitrary paths under dist. Our previous setup depended on a
known Embroider Rollup bug (embroider-build/embroider#2461), which caused the build to
break once upgraded.

By moving style copying and CSS compilation into a late build step and avoiding Rollup
asset emission for CSS entirely, the output becomes deterministic and fully compatible
with Embroider v8 while preserving the existing published structure and consumer-facing
import paths.

🛠️ Detailed description

📸 Screenshots

🔗 External links

Jira ticket: HDS-XXX
Figma file: [if it applies]


👀 Component checklist

💬 Please consider using conventional comments when reviewing this PR.

📋 PCI review checklist
  • If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.
  • If applicable, I've worked with GRC to document the impact of any changes to security controls.
    Examples of changes to controls include access controls, encryption, logging, etc.
  • If applicable, I've worked with GRC to ensure compliance due to a significant change to the in-scope PCI environment.
    Examples include changes to operating systems, ports, protocols, services, cryptography-related components, PII processing code, etc.

@aklkv aklkv self-assigned this Jan 13, 2026
@vercel
Copy link

vercel bot commented Jan 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
hds-showcase Ready Ready Preview Jan 13, 2026 10:11am
hds-website Ready Ready Preview Jan 13, 2026 10:11am

@aklkv aklkv changed the title chore(components): update @embroider/addon-dev v8 chore(components): update @embroider/addon-dev v8 Jan 13, 2026
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have put comprehensive explanation why it's needed I will let you decide which way you prefer it unblocks upgrade to for addon-dev and should go in soon to unblock gts migration work

Copy link
Contributor

@didoo didoo Jan 14, 2026

Choose a reason for hiding this comment

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

In that case, please open also a PR on the main feature branch #3237 for Project Solar ("IBM carbonization" of HDS) so that your update works also on that branch, which represents a large (months) chunk of work; otherwise how would we "merge" the two approaches?

/cc @alex-ju @hashicorp/hds-engineering

@shleewhite
Copy link
Contributor

Closing in favor of the approach taken in: #3509

@shleewhite shleewhite closed this Jan 27, 2026
@alex-ju alex-ju deleted the chore/addon-dev branch January 27, 2026 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants