Vue.js Polyfill "webpack" template


Files or packagesCommand or configuration to modify
babel-polyfillnpm i -save babel-polyfill
karma.conf.jsfiles: ['../../node_modules/babel-polyfill/dist/polyfill.js','./index.js'],
webpack.base.conf.jsapp: ['babel-polyfill', './src/main.js']


The configurations described above, the example using a non-sstandardised function will work on "internet explorer" and npm test will pass.

Usage of functions to polyfill (ex: find)

  <div class="hello">
    <p>{{ filtered() }}</p>

export default {
  name: 'hello',
  data () {
    return {
      list: ['toto', 'titi', 'tata', 'tete']
  methods: {
    filtered () {
      return this.list.find((el) => el === 'tata')