Problem/Motivation
I've had to remove certain libraries from the front end as they error out because of require.js (which has been a total nightmare that we're trying to move away from). I used libraries-override to remove core/tabbable (from core.libraries.yml) because it was throwing errors.
Got some errors today because tabble.jquery.shim (also core.libraries.yml) is being loaded, which depends on tabbable.
Library config for tabbable.jquery.shim from core.libaries.yml:
tabbable.jquery.shim: version: VERSION js: misc/jquery.tabbable.shim.js: {} dependencies: - core/drupal - core/tabbable - core/jquery
Seems like if a dependency of a library is removed that the library should not be loaded, and ideally a warning is logged.
Steps to reproduce
In a theme, add:
libraries-override: core/tabbable: false
Then add under libraries:
libararies: core/tabbable.jquery.shim
This will load tabbable.jquery.shim even though core/tabbable is a dep that has been removed.
Proposed resolution
If a library is removed, any library depending on it should not be loaded.
Comments
Comment #2
wesruv commentedComment #3
wesruv commentedComment #4
wesruv commentedI marked this 9.3.x-dev because that's the version we're on, not sure what I should mark?
Comment #5
cilefen commentedComment #6
nod_If I followed the example, what you expect to happen is that
core/tabbable.jquery.shimis NOT loaded at all because thecore/tabbablelibrary was removed. Is that correct?Comment #7
wesruv commentedCorrect!
Comment #8
nod_