By catch on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
11.5.x
Introduced in version:
11.5.0
Issue links:
Description:
Where a library needs to be loaded explicitly before or after another library, regardless of dependencies, the new 'before' and 'after' keys can be used.
Example
before_main:
js:
before_main.js: {}
before:
- common_test/main
main:
js:
main.js: {}
after_main:
js:
after_main.js: {}
after:
- common_test/main
By using this, library order can be modified without having to force a dependency, which can lead to unnecessary library loading if used purely to affect loading order.
Custom weights for individual files are now discouraged in favor of this new method, and may be deprecated in a future release.
Impacts:
Site builders, administrators, editors
Module developers
Themers