chore(components): update @embroider/addon-dev v8#3474
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
@embroider/addon-dev v8
c0a9b60 to
730624e
Compare
There was a problem hiding this comment.
[blocker] we're moving away from this plugin, see https://github.com/hashicorp/design-system/pull/3237/files#diff-30635ef46c2e2d021e9e18afbf2cab0bfd4b5c3d8201db8c1321306396d28955
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
|
Closing in favor of the approach taken in: #3509 |
📌 Summary
This PR updates the
@hashicorp/design-system-componentsbuild to be compatible with@embroider/addon-devv8 by removing our reliance onrollup-plugin-scssand theprevious Rollup output behavior that only worked due to an Embroider bug.
What changed
rollup-plugin-scsswith a small Rollup “sidecar” plugin that:src/styles/**→dist/styles/**late in the build (duringwriteBundle)sassand writes them next to thepublished SCSS:
dist/styles/@hashicorp/design-system-components.cssdist/styles/@hashicorp/design-system-power-select-overrides.cssaddon.publicEntrypoints()since styles are now publishedvia explicit copying instead of Rollup’s module graph.
package.jsonexportsto explicitly support existing consumer import paths:@hashicorp/design-system-components.css@hashicorp/design-system-power-select-overrides.{css,scss}./styles/*mappingsWhy it was needed
With
@embroider/addon-devv8, Rollup output handling is stricter and no longer allowsemitting files into arbitrary paths under
dist. Our previous setup depended on aknown 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
Examples of changes to controls include access controls, encryption, logging, etc.
Examples include changes to operating systems, ports, protocols, services, cryptography-related components, PII processing code, etc.