vue-meta icon indicating copy to clipboard operation
vue-meta copied to clipboard

build: Integrated babel into build to make bundle compatible with ES5+

Open slurmulon opened this issue 3 years ago • 0 comments

Changes

  • Integrated @rollup/plugin-babel into the build so that the bundle contains polyfilled code that is compatible with ES5+.
  • These changes prevent breaking syntax errors on older versions of Chrome, Firefox, Safari, etc.

Gotchas

  • I noticed a small change to dist/vue-meta.d.ts, but I'm not sure why it was introduced. I can dig into this further if needed, it seems like it could impact TypeScript integrations.
    • Interestingly, I ran the build against v3.0.0-alpha.10 and noticed the exact same change, so this does not appear to relate to my change (perhaps it's due to an implicit version bump related to TypeScript).
  • I assumed IE9 as a build target, and this seemed necessary (for some reason) to fully polyfill the code - also happy to experiment with this more if needed/preferred.
  • The size of the bundle naturally increases due to polyfilling (273k -> 357k).

Issues

  • #773
  • #760 (related)

slurmulon avatar Jul 27 '22 13:07 slurmulon