Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove UserFrosting-specific merge logic #802

Open
Silic0nS0ldier opened this issue Jul 2, 2023 · 0 comments
Open

Remove UserFrosting-specific merge logic #802

Silic0nS0ldier opened this issue Jul 2, 2023 · 0 comments

Comments

@Silic0nS0ldier
Copy link
Member

Configuration merging is a bespoke feature that was only added here to simply maintenance of UserFrosting's Sprinkle plugin system. The system operates on a few rules;

  1. replace where new incoming bundles replace those already defined.
  2. merge where 2 bundles are combined. styles and scripts arrays are merged manually via Set, everything else is left up to the jest-extend library.
  3. ignore where new incoming bundles are discarded if they collide.
  4. error where collisions trigger a failure.

The chosen rule is defined by the incoming bundle, defaulting to replace.

This is a lot of logic to maintain, and the primary consumers (UserFrosting developers) would expect that bundling logic is tied to their version of UserFrosting (it is, compatibility is managed via semver).

This style of asset management is very much on the way out but is likely to see continued use in niche scenarios. Keeping the cost of ownership low (minimum API surface, lockdown the feature set, but keep what is offered flexible) is the goal looking forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant