index.js 947 B

1234567891011121314151617181920212223242526272829303132
  1. try {
  2. var vueVersion = require('vue').version
  3. } catch (e) {}
  4. var packageName = require('./package.json').name
  5. var packageVersion = require('./package.json').version
  6. if (vueVersion && vueVersion !== packageVersion) {
  7. var vuePath = require.resolve('vue')
  8. var packagePath = require.resolve('./package.json')
  9. throw new Error(
  10. '\n\nVue packages version mismatch:\n\n' +
  11. '- vue@' +
  12. vueVersion +
  13. ' (' +
  14. vuePath +
  15. ')\n' +
  16. '- ' +
  17. packageName +
  18. '@' +
  19. packageVersion +
  20. ' (' +
  21. packagePath +
  22. ')\n\n' +
  23. 'This may cause things to work incorrectly. Make sure to use the same version for both.\n' +
  24. 'If you are using vue-loader@>=10.0, simply update vue-template-compiler.\n' +
  25. 'If you are using vue-loader@<10.0 or vueify, re-installing vue-loader/vueify should bump ' +
  26. packageName +
  27. ' to the latest.\n'
  28. )
  29. }
  30. module.exports = require('./build')