meteor-vue / vue-meteor

🌠 Vue first-class integration in Meteor
897 stars 112 forks source link

[Packages/vue-component] fix: component registration with meteor 1.8.2 #380

Closed jbl2024 closed 4 years ago

jbl2024 commented 4 years ago

See #364

require behavior has changed in meteor 1.8.2

jaumeMR commented 4 years ago

This change prevents it from working in legacy browsers. With this small addition I have it working on them:

js += `\nvar _Vue = require('vue').default;
      if (!_Vue) _Vue = require('vue');
      _Vue.component(__vue_options__.name, __vue_script__);\n`
mullojo commented 4 years ago

It would really help me a lot if this fix could be implemented! @Akryum , have you been able to take a look into this yet? Much thanks! I would be happy to contribute on Patreon for all the great work you have done on Meteor + Vue. I started a project a year ago and have heavily dependant on your packages and work. Thank you! Bob

mullojo commented 4 years ago

Hi @mitar, if @Akryum can't get to this, would you be able to make this change? I would really appreciate this fix!

mitar commented 4 years ago

This looks reasonable for me.