Would probably require a different content model
It should be possible to load with mw.loader calls, just like CSS
Description
Related Objects
Event Timeline
I just wrote an extension to do this. One blocker that prevented me from releasing so far was that I couldn't decide if @import MediaWiki:somepage.less was a requirement - the current Less parser doesn't support virtual Less files for imports. It would also allow making redirects really simple.
Trying to implement this in an extension did have some limitations that would be resolved by providing this functionality in MediaWiki itself.
I'd like to know if Performance-Team has any objections against this feature request before I decide to create a patch or publish the extension - I'd rather not have to do both and create more work for myself.
For core and WMF, this has previously been declined at T56864.
@Mainframe98 As extension author, I suppose it's up to you to decide what capabilities and features to offer and how to surface those abilities to end-users.