ext.relatedArticles.readMore.bootstrap: Convert to 'packageFiles'

This enables use of module.exports and require() within the module,
and makes it easy to bundle additional data and scripts generated
by the server (without needing to subclass FileModule in PHP).

In particular, to bundle mw.config values with the module.
Currently the extension is adding these to the <head> of all
articles which delays rendering of the article content, and the
time to when JS can start to be fetched.

See <https://phabricator.wikimedia.org/T219342#5116773>.

Bug: T219342
Change-Id: I3f174418af8bfd83b0faabe484226e323714cb5b
This commit is contained in:
Timo Tijhof 2019-05-25 22:13:29 +01:00 committed by Krinkle
parent 1961f3ac94
commit a418550db3

View file

@ -92,8 +92,10 @@
]
},
"ext.relatedArticles.readMore.bootstrap": {
"scripts": [
"resources/ext.relatedArticles.readMore.bootstrap/index.js"
"localBasePath": "resources/ext.relatedArticles.readMore.bootstrap",
"remoteExtPath": "RelatedArticles/resources/ext.relatedArticles.readMore.bootstrap",
"packageFiles": [
"index.js"
],
"dependencies": [
"mediawiki.experiments",