hilongjw / vue-datepicker

[Deprecated] calendar and datepicker component with material design for Vue.js
http://hilongjw.github.io/vue-datepicker/demo.html
MIT License
702 stars 207 forks source link

error : exports is not defined #117

Open ghost opened 7 years ago

ghost commented 7 years ago

Uncaught ReferenceError: exports is not defined at eval (eval at (app.js:1653), :12:23) at Object. (app.js:1653) at webpack_require (app.js:660) at fn (app.js:86) at eval (eval at (app.js:1963), :8:3) at Object. (app.js:1963) at webpack_require (app.js:660) at fn (app.js:86) at eval (eval at (app.js:1674), :2:73) at Object. (app.js:1674)

michaelzhouh commented 7 years ago

I've got the same error, my solution to the problem is like this:

  1. "npm install monment"
  2. copy "vue-datepicker-es6.vue" to your project(u can modify the file name)
  3. "import datePicker from '@/components/common/datePicker'" ,then copy the code from the demo
Teemwu commented 7 years ago

import myDatepicker from 'vue-datepicker/vue-datepicker-es6.vue';