Page MenuHomePhabricator

Make CodexModules that use codexComponents automatically add Vue as a dependency
Closed, ResolvedPublic

Description

Right now, module definitions for modules using the new code splitting feature with codexComponents look like this:

{
    "class": "MediaWiki\\ResourceLoader\\CodexModule",
    "codexComponents": [
        ...
    ],
    "dependencies": [
          "vue"
    ]

If you don't specify vue as a dependency, things break. It makes some amount of sense that you would need to do this, because the code in such a module probably does depend on Vue. But on the other hand, the code pulled in by codexComponents won't work without Vue, so it makes sense for Vue to be an implicit dependency (just as it would be if you listed @wikimedia/codex as a dependency).

We should change CodexModule so that it automatically adds Vue as a dependency when codexComponents is used.

Event Timeline

Change 980450 had a related patch set uploaded (by Anne Tomasevich; author: Anne Tomasevich):

[mediawiki/core@master] CodexModule: Add Vue as a dependency if not already listed

https://gerrit.wikimedia.org/r/980450

Change 980450 merged by jenkins-bot:

[mediawiki/core@master] CodexModule: Add Vue as a dependency if not already listed

https://gerrit.wikimedia.org/r/980450

This will ride the train next week