mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RelatedArticles
synced 2024-11-27 17:50:25 +00:00
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:
parent
1961f3ac94
commit
a418550db3
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue