vuejs / vue-cli

🛠️ webpack-based tooling for Vue.js Development
https://cli.vuejs.org/
MIT License
29.75k stars 6.33k forks source link

Object.entries polyfills are not working #4350

Closed JFGHT closed 5 years ago

JFGHT commented 5 years ago

Version

3.9.3

Environment info

System:
    OS: Linux 5.0 Ubuntu 19.04 (Disco Dingo)
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
  Binaries:
    Node: 10.16.0 - ~/.nvm/versions/node/v10.16.0/bin/node
    Yarn: 1.17.3 - /usr/bin/yarn
    npm: 6.9.0 - ~/.nvm/versions/node/v10.16.0/bin/npm
  Browsers:
    Chrome: Not Found
    Firefox: 68.0
  npmPackages:
    @bugsnag/plugin-vue: ^6.3.0 => 6.3.0 
    @chenfengyuan/vue-number-input: ^0.5.2 => 0.5.3 
    @fortawesome/vue-fontawesome: ^0.1.1 => 0.1.6 
    @posva/vuefire-core:  2.1.0 
    @types/vue-scrollto: ^2.7.2 => 2.14.0 
    @vue/babel-helper-vue-jsx-merge-props:  1.0.0 
    @vue/babel-plugin-transform-vue-jsx:  1.0.0 
    @vue/babel-preset-app:  3.9.2 
    @vue/babel-preset-jsx:  1.0.0 
    @vue/babel-sugar-functional-vue:  1.0.0 
    @vue/babel-sugar-inject-h:  1.0.0 
    @vue/babel-sugar-v-model:  1.0.0 
    @vue/babel-sugar-v-on:  1.0.0 
    @vue/cli-overlay:  3.9.0 
    @vue/cli-plugin-babel: ^3.0.0-rc.12 => 3.9.2 
    @vue/cli-plugin-eslint: ^3.0.0-rc.12 => 3.9.2 
    @vue/cli-plugin-typescript: ^3.0.0-rc.12 => 3.9.0 
    @vue/cli-plugin-unit-jest: ^3.0.0-rc.12 => 3.9.0 
    @vue/cli-service: ^3.0.0-rc.12 => 3.9.2 
    @vue/cli-shared-utils:  3.9.0 
    @vue/component-compiler-utils:  2.6.0 
    @vue/eslint-config-airbnb: ^4.0.0 => 4.0.1 
    @vue/eslint-config-typescript: ^3.0.0-rc.12 => 3.2.1 
    @vue/preload-webpack-plugin:  1.1.0 
    @vue/test-utils: ^1.0.0-beta.24 => 1.0.0-beta.29 
    @vue/web-component-wrapper:  1.2.0 
    bootstrap-vue: ^2.0.0-rc.11 => 2.0.0-rc.26 
    eslint-plugin-vue:  4.7.1 
    idle-vue: ^2.0.5 => 2.0.5 
    jest-serializer-vue:  2.0.2 
    portal-vue:  2.1.5 
    svg-to-vue:  0.3.0 
    typescript: ^3.2.1 => 3.5.3 
    vue: ^2.5.16 => 2.6.10 
    vue-analytics: ^5.16.0 => 5.17.0 
    vue-animate-number: ^0.4.2 => 0.4.2 
    vue-awesome-swiper:  3.1.3 
    vue-burger-menu: ^2.0.2 => 2.0.2 
    vue-chartjs: ^3.4.0 => 3.4.2 
    vue-class-component: ^6.0.0 => 6.3.2 
    vue-cli-webpack:  1.0.0 
    vue-cookie-accept-decline: ^5.0.1 => 5.2.3 
    vue-eslint-parser:  2.0.3 
    vue-functional-data-merge:  3.1.0 
    vue-hot-reload-api:  2.3.3 
    vue-i18n: ^8.7.0 => 8.12.0 
    vue-image-lightbox-carousel: ^1.0.7 => 1.0.7 
    vue-jest: ^3.0.0 => 3.0.4 
    vue-js-modal: ^1.3.16 => 1.3.31 
    vue-lazyload: ^1.2.6 => 1.3.1 
    vue-loader:  15.7.0 
    vue-moment: ^4.0.0 => 4.0.0 
    vue-property-decorator: ^7.0.0 => 7.3.0 
    vue-recaptcha: ^1.1.1 => 1.2.0 
    vue-resize:  0.4.5 
    vue-router: ^3.0.1 => 3.0.7 
    vue-scrollto: ^2.11.0 => 2.15.0 
    vue-server-renderer:  2.6.10 
    vue-simple-headful: ^2.2.6 => 2.2.6 
    vue-style-loader:  4.1.2 
    vue-svg-loader: ^0.11.0 => 0.11.0 
    vue-template-compiler: ^2.5.16 => 2.6.10 
    vue-template-es2015-compiler:  1.9.1 
    vue-waypoint: ^3.2.2 => 3.2.2 
    vue2-google-maps: ^0.10.6 => 0.10.7 
    vuejs-paginate: ^2.1.0 => 2.1.0 
    vuex: ^3.0.1 => 3.1.1 
    vuex-class: ^0.3.1 => 0.3.2 
    vuex-toast: ^0.1.3 => 0.1.3 
    vuexfire: ^3.0.0-alpha.11 => 3.1.0 
  npmGlobalPackages:
    @vue/cli: Not Found

Steps to reproduce

module.exports = {
  presets: [
    [
      '@vue/app',
      {
        polyfills: [
          'es6.promise',
          'es6.symbol',
          'es7.promise.finally',
          'es7.object.entries',
        ],
      },
    ],
  ],
};

What is expected?

That Object.entries is working in old browsers.

What is actually happening?

Getting undefined in Object.entries on Firefox 35 (Win XP - browserstack) when executing vue-cli-service serve.

haoqunjiang commented 5 years ago

Tried IE11 and the polyfill works. Could you please provide a reproduction repo?