Closed alexweissman closed 6 years ago
Based purely on observation, I'd say its sorting the array in alphabetical order. Presumably the plugin used is doing this to improve performance. A fix would entail finding a plugin that does what we want (will take awhile), or creating our own (better put off for the planned asset overhaul).
If it were sorting alphabetically, though, why would the vendor/
paths come first?
Right...
Replicated the issue. I know whats happening. Instead of appending, its prepending.
...and looking at the code, this is really obvious. Really should have named that rule append
...
dev
was unaffected as the PHP side handles that, and does the merging in a drastically different way.
I can confirm that solved the issue with my Sprinkle 👍
When using the
merge
option foronCollision
as documented in https://learn.userfrosting.com/building-pages/assets/asset-bundles#extending-and-overriding-bundles, the order of the assets should reflect the order of loaded Sprinkles. For example, if I have thejs/form-widgets
bundle incore
defined as:and then I later load a Sprinkle
site
with the following definition:The result is:
So, the
bundle-build
task is putting the assets fromsite
ahead of the assets fromcore
. The problem only seems to happen with compiled assets - raw assets are loaded in the correct order.