TahaSh / vue-paginate

A simple vue.js plugin to paginate data
MIT License
594 stars 103 forks source link

Unable to set property 'VuePaginate' of undefined or null reference #124

Open ibdf opened 5 years ago

ibdf commented 5 years ago

I tried running VuePaginate in IE11 but it failed because IE11 does not support the Array.find method, which seems to be used by VuePaginate.

The Vue cli gives you the option to polyfill node modules by adding the following to the vue.config.js file (see more -> https://cli.vuejs.org/config/#transpiledependencies)

transpileDependencies: [
    'vue-paginate',
],

However, when I add this setting I get the following error in the IE browser inspector:

Unable to set property 'VuePaginate' of undefined or null reference

When run,npm run serve, I see the following:

"export 'default' (imported as 'VuePaginate') was not found in 'vue-paginate'

Honestly, I am not sure if this is an issue with the plugin or with the transpiller. I tried adding other node_modules/dependencies to the settings above to see if they would also break, but unfortunately I only see this issue with VuePaginate.

I can bypass this issue by simply adding a polyfill manually to my project, but in this case I was trying to rely on vue and babel to do that for me.