Explicitly define module position#17
Conversation
Style modules currently added through addModuleStyles default
to being in the head ("top" position). This is an unhealthy default,
since only critical styles that are needed at pageload should be
in the head. In order to be able to switch the default to "bottom",
existing module positions have to be defined explicitly.
Bug: T97410
|
I think the styles in question in this component can be at the bottom. Wouldn't that be better in terms of performance/page load time? |
|
Indeed, "bottom" would be much better in terms of performance! I highly recommend that you change it to that if you can. But I leave that to the extension maintainers to figure out and test. Since I'm sending changesets for all extensions used in production, it would be too time-consuming to figure that out on my own. It's much less risky for me to write a no-op commit that merely exposes the current state. Please note that making "bottom" modules added that way actually load at the bottom depends on a changeset I haven't finished yet: https://gerrit.wikimedia.org/r/#/c/206831/ Right now, even if you mark it "bottom" addModuleStyles will put it in the head anyway. |
Explicitly define module position
Style modules currently added through addModuleStyles default to being in the head ("top" position). This is an unhealthy default, since only critical styles that are needed at pageload should be in the head. In order to be able to switch the default to "bottom", existing module positions have to be defined explicitly.
Bug: T97410