vuex-pathify: Missing polyfill 'Includes' IE 11

Using version 1.2.2 and I seem to get the following error on IE 11

object doesn't support property or method 'includes'

Vue-cli usually automatically includes missing polyfills except for this one. Is there a way to resolve the issue so I can get this to work on IE 11?

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Comments: 15 (7 by maintainers)

Most upvoted comments

I had the same problem and solved it ,add the following configuration If you’re using Vue.

// vue.config.js
module.exports = {
  transpileDependencies: [
    'vuex-pathify'
  ]
}

If you use this scheme, you don’t have to write polyfill yourself.

Thanks for the ticket. I’ll get that added in a future release 😃

Closing the loop on this… I released the global polyfill and modifying String.includes started throwing errors on one of our major partner sites: Cannot redefine non-configurable property 'includes'

I had to take out vuex-pathify while you (or I, lemme know if you need me to make code changes) apply the fix you described above.

Fair point!

OK, I’ll create an includes() helper or just let folks do it themselves.

Hey @bkarlson - not added yet, but I’m going to go through all outstanding tickets next week and I’ll add this then.

P.S. Glad you are enjoying it!