tralves / weex-todo-list

A demo To-do app built with Weex and Vue2.0
155 stars 41 forks source link

when I use weex, in the .vue page, if I require a moment.js, the page doesn`t render successfully. #3

Open JuseChen opened 7 years ago

JuseChen commented 7 years ago

I install the lodash.js and moment.js in the same way. When I require the lodash.js into .vue page, the page render successfully, but when I require the moment.js, the page fail to render.I don`t know why? this is my code:

const modal = weex.requireModule('modal') const _=require('lodash'); const moment = require('moment'); // modal.alert({ // message:moment // }); const startTime='2016-05-05'; const length=30; const leftTime=2; // 有效起始时间 const mStartDate = moment(startTime);

tralves commented 7 years ago

Hi,

In which platform does the error occur (web/android/iOS)? Can you see any error in the console?

Also, can we take this conversation to the gitter channel? It will be easier to help you there, and this is not really an issue with this project.