Code Monkey home page Code Monkey logo

vue-webpack-meteor-example's Introduction

Webpack + Vue + Meteor Example

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

vue-webpack-meteor-example's People

Contributors

yyx990803 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vue-webpack-meteor-example's Issues

Hot reload

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.

Status

Will this work with the latest version of Meteor? Thanks.

With Vue-router: component is a fragment instance

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?

migrate to meteor 1.3

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 ?

FlowRouter example?

Would it be possible to extend this example to show a slightly larger app example, possibly with FlowRouter etc.? Thanks in advance.

奇怪的问题。Meteor的bug?还是Vue的bug?

有个很奇怪的问题。
用这个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结合起来用了,总不能不更新数据啊。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.