• Hi,

    I am Yuvaraj, Developer of WPCal.io WordPress plugin.
    We have a common user. Who reported that a date picker is not appearing on the booking page of my plugin.

    On further investigation, both the plugins are using Vue library and having a conflict.

    As per the following articles(https://blog.logrocket.com/use-vue-js-general-purpose-javascript-library/, https://vuejs.org/v2/cookbook/packaging-sfc-for-npm.html#What-does-my-packaged-component-look-like), Vue component initiates automatically if a global Vue(window.Vue) variable is declared.

    It looks like LearnPress plugin declares window.Vue and window.Vuex etc. A few of the NPM modules used in my plugin initiates with the window.Vue variable which is creating the issue in more than a couple places in my plugin.

    In order to fix the issue and avoid any future conflict with other plugins, please avoid using/declaring window.Vue variable, so that many Vue based plugins can co-exist on a single page. Please let me know if we have another solution or any other queries. My plugin is recently launched one, resolving this conflict sooner will be very helpful.

    Cheers,
    Yuvaraj

Viewing 3 replies - 1 through 3 (of 3 total)
  • that is the library of Vue so we can’t interfere with it

    Thread Starter Yuvaraj Senthil

    (@yuvarajsenthil)

    ok, can you point me to the library or provide its name?
    Are you using Webpack along with Vue?

    Thread Starter Yuvaraj Senthil

    (@yuvarajsenthil)

    It looks like if you use a module bundler like Webpack these conflict issues can be avoided.

    Evan You Creator of Vue JS as mentioned this in the discussion of no-conflict for Vue js here https://github.com/vuejs/vue/issues/2349#issuecomment-200102782.

    I think the best practice is: if you are expecting your code to run in an environment that you don’t control, do not rely on window globals and do not expose window globals. Use a module bundler 🙂

    I request you to look for a possible solution soon.

    Cheers,
    Yuvaraj

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Conflict with WPCal.io Plugin – Vue library’ is closed to new replies.