Example using Vue with Meteor, while leveraging the normal Webpack + NPM workflow for your front-end.
cd .client
npm install
npm run dev
# at project root in another terminal
meteor
Example using Vue with Meteor, while leveraging the normal Webpack + NPM workflow for your front-end.
Has anybody got hot reload working? I installed webpack-dev-server
and I am running:
webpack-dev-server --inline --hot
but it is not hot reloading, in fact it is not reloading at all. With webpack --watch
full reload works ok.
Hi!
Would love to see how to use Vue 2.0 with meteor, or is it practically the same structure with 2.0?
Will this work with the latest version of Meteor? Thanks.
I got this error when using vue-router:
Attribute "id" is ignored on component <div> because the component is a fragment instance:
index.html
<body>
<div id="app"></div>
</body>
main.js
Vue = require('vue')
VueRouter = require('vue-router')
Vue.use(VueRouter)
Template.body.onRendered(function(){
router.start(App, '#app');
});
app.vue:
module.exports = Vue.extend({
template : '<router-view></router-view>',
data : function(){
return {
version : '1.0.0'
};
},
components : {
'layout' : require('./defaults/layout.vue')
}
})
I've tried some alternatives without success, some idea?
got error main.js:4 Uncaught ReferenceError: Template is not defined
when meteor update
It seems the meteor 1.3 using a new modules based pseudo-globals. How to simply using with webpack without shim-loader or etc ?
Would it be possible to extend this example to show a slightly larger app example, possibly with FlowRouter etc.? Thanks in advance.
The change from vue-multi-loader to vue loader breaks the current application.
有个很奇怪的问题。
用这个example,如果用两个浏览器进程分别打开,比如一个Chrome,一个Safari,在一个浏览器里,更新了某个document的内容,更新后的数据不能在另一个浏览器正常显示。按理,Meteor会同步这些数据的。
下面的步骤应该可以重现:
1、执行 meteor add insecure,让客户端可以更新服务端的数据(用Todos.allow也是一样)。
2、meteor --release 1.1.0.2 启动服务端,用两个浏览器,分别打开网站
3、在一个浏览器的console里,执行Todos.update(xxx, {$set: {text: "updated"}}),xxx是一个todo的_id
4、在当前浏览器(假设为A)里,网页内容正确更新,但是在另一个浏览器(假设为B)里,这个todo的text取不到,显示为空,只有刷新浏览器之后,才能正常显示。
我简单调试了一下,被更新的这个document,同步到B后,LocalCollection里只有_id,其他数据都没了,而其他没有更新的document则没问题,所有字段都在(也应该在,压根没有更新他们)。服务端用meteor mongo看,所有数据都正常,该更新的都被更新了。客户端(B)里,哪怕用console取Todos.find().fetch(),取出来的对象里,这个document也是只有_id的。
看上去像Meteor数据同步到客户端时的问题,但是纯粹的Meteor应用没问题,甚至我试过不用Meteor的Blaze而用React也没问题。为什么vue会影响meteor的行为?这个问题不搞清楚,没法把vue和meteor结合起来用了,总不能不更新数据啊。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.