Code Monkey home page Code Monkey logo

mmf-blog-vue2-ssr's Issues

cookie问题是如何解决的?

朋友你好,我在sf上看到你的这篇文章,但是没看懂解决思路,我查看你的commit线,有修改过cookie的解决方法,如你所说,vue-ssr的资料不多,最近写项目时也遇到登陆问题,尝试了一些方法都无法实现登陆功能,到目前为止只发现你的这个项目完美实现了,希望能讲解一下你的思路,万分感谢!

做服务端渲染时,只保存了一份cookie,那多个用户同时请求时好像会交叉请求状态污染

看了一下代码,先是在entry-server.js中调了api.setCookies(context.cookies),然后在this.api中就已经设置好cookie了,所有请求使用的都是同一份index-server.js导出的实例,这样在多个用户同时请求时,如A先请求,先设置了A的cookie,A的请求还没处理完成,B也来请求了,这样不是B的cookie会覆盖掉A的cookie吗,这样后续A的请求不是就会被污染了吗?如果分析有误,还请指正!

CaseSensitivePathsPlugin找不到

This relative module was not found:

  • ./App.vue in ./src/main.js
    Client errors
    ./src/main.js
    Module not found: Error: [CaseSensitivePathsPlugin] mmf-blog-vue2-ssr/src/App.vue does not match the corresponding path on disk app.vue.

store 应该没有被回收

这个写法应该是错的:

const state: {
  test: []
}

const mutations = {
  push_test (state, data) {
    if (test.length) {
      console.log('输出这一句证明有Bug')
    } else {
      state.test = data // Array
    }
  }
}

关于ssr cookie的处理方法

之前搜了一下google,第一篇就找到你的,我自己也是用的第三种方法,但是跟你的有点区别,没那么繁琐,什么时候来讨论一下,加个微信或者Q?

你好,请问一下

我是在你最新的介绍vue-ssr的下面留言的那个人,我想问一下api服务器和网站服务器是怎样一个关系,可不可以用leancloud的服务呢?那么你在那里买的服务器呢?

如何按需进行数据的预取?

朋友,又来打扰你了。最近在看你这个项目时遇到了一个问题,我观察到预取数据window.__INITIAL_STATE__中,在列表页查看源代码,详情页即item:{"data":{}}为空,在详情页查看源代码,列表页即"frontend":{"article":{"lists":{"data":[],"hasNext":0,"page":1,"path":""}为空,成功做到了按页面所需进行预取数据,然而entry-server.js在中, context.state = store.state,长下文会预取所有state数据,所以我想问下你是如何做到数据按需预取的,谢谢

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.