Michael edited projects, added Technical Improvements; removed Wikidata-Bridge. Michael added a comment.
@Lucas_Werkmeister_WMDE and I looked into this today and encountered some problems with getting this to work. While it is correct that the promise polyfill is included by default (vuejs/vue-cli#1248 <https://github.com/vuejs/vue-cli/issues/1248>, vuejs/vue-cli#5208 <https://github.com/vuejs/vue-cli/issues/5208>), it should be possible to change that with the following as `babel.config.js` (possible trimming `polyfills` if those default polyfills are not needed): module.exports = { presets: [ [ '@vue/cli-plugin-babel/preset', { exclude: [ 'es.promise', // polyfilled via es6-promise ResourceLoader module instead ], polyfills: [ 'es.array.iterator', 'es.object.assign' ], } ], ], }; However, that currently doesn't prevent the `es.promise` polyfill from being included. The cause is to be found in `@vue/babel-preset-app` which is included by our `@vue/cli-plugin-babel/preset`. This handles the `exclude` parameter correctly through most of the file, but at the end <https://github.com/vuejs/vue-cli/blob/34f303b0b6a03f96e8c21d308931219154a7e627/packages/%40vue/babel-preset-app/index.js#L245-L253> it requires `@babel/preset-env` again, but without including the preset options that were carefully constructed through that file. The cause for this seems to have been a bug in babel itself <https://github.com/babel/babel/issues/7597> for which adding that extra transpilation seems to be the recommended workaround <https://github.com/babel/babel/issues/9903>. It is unclear whether that necessitates the inclusion of the promise polyfill. An upstream pull request <https://github.com/vuejs/vue-cli/pull/5522> to use the envOptions also for that transpilation was created by @Lucas_Werkmeister_WMDE . Further it seems that the original babel bug was resolved <https://github.com/babel/babel/issues/7597#issuecomment-623614382> and the respective file in vue-cli is actively being worked on <https://github.com/vuejs/vue-cli/commit/91ca0b1f3c67736a692f93060e22477516a332f5#diff-d8e341482c7dd4a7872d0eea73aa34d9>. So there is some hope that this improvement can be implemented soon™. (@Lucas_Werkmeister_WMDE feel free to correct me if my summary above can be improved) TASK DETAIL https://phabricator.wikimedia.org/T248840 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Michael Cc: Michael, Lucas_Werkmeister_WMDE, Aklapper, Sarai-WMDE, darthmon_wmde, Nandana, Lahi, Gq86, Pablo-WMDE, GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, Wikidata-bugs, aude, Lydia_Pintscher, Mbch331
_______________________________________________ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs