Pablo-WMDE added a comment.

  WARNING: babel config sometimes cached between builds
  https://github.com/vuejs/vue-cli/issues/3275#issuecomment-453038110
  
  babel.config.js configuration (see 
https://cli.vuejs.org/guide/browser-compatibility.html#usebuiltins-usage)
  `useBuiltIns: 'usage'` is the default, through @vue/babel-preset-app pulls in 
plugins that satify vue/vuex & our source code
  `debug: true` is a thing, shows plugins & config used in the end
  `ignoreBrowserslistConfig: true` actually makes ~init.js [a little] bigger, 
i.e. browserlist has effect
  
  "There are many misconceptions in the community, as well, that modern 
browsers "don't need" polyfills, or that polyfills/shims merely serve to add 
missing features - in fact, they often repair broken implementations, even in 
the most modern of browsers. The best practice thus remains to unconditionally 
and synchronously load all polyfills/shims, despite the bundle size cost this 
incurs."
  https://webpack.js.org/guides/shimming/
  
  These are the implied polyfills for vue/vuex
  
https://github.com/vuejs/vue-cli/blob/c5f1d20a75ee77559fdec51bedaeb72cb15b3f41/packages/%40vue/babel-preset-app/index.js#L3
  
  definition of polyfill vs transform
  https://medium.com/@jcse/clearing-up-the-babel-6-ecosystem-c7678a314bf3
  tl,dr: "whether or not you can reimplement the feature today, in ES5"
  
  evan & linus on useBuiltIns
  https://github.com/vuejs/vue-cli/issues/1248#issuecomment-388117018 ff.
  
  evan's wise words on transpileDependencies
  https://github.com/vuejs/vue-cli/issues/1568#issuecomment-406419267
  
  Configuring babel for monorepos is quite a feat _should_ you want limited 
reuse (which we don't ATM)
  https://babeljs.io/docs/en/config-files#monorepos
  
  Result:
  
  - the premise "babel does not use .browserlistrc to decide which polyfills to 
include" is not accurate
  
  Possible actions (somewhat either/or considering it all ends up in 
ResourceLoader):
  
  - babel as a separate entry point could avoid shipping global polyfills twice 
-> does this still make sure the (babel-runtime) namespaced polyfills exist, 
e.g. instance methods?
  - manage the polyfills for init independently (maybe through `useBuiltIns: 
'entry'`) that are currently implied by @vue/babel-preset-app to be all of vue's

TASK DETAIL
  https://phabricator.wikimedia.org/T226488

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Pablo-WMDE
Cc: Pablo-WMDE, darthmon_wmde, Aklapper, Michael, Nandana, Lahi, Gq86, 
GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Wikidata-bugs, 
aude, Lydia_Pintscher, Mbch331
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to