Giter Club home page Giter Club logo

Comments (1)

smallpath avatar smallpath commented on July 20, 2024

有两点

  • 最好在所有页面开发完毕后再上SSR
    • 因为热重载目前貌似只能重载SSR端的server-bundle.js, 边开发页面边弄SSR实在是太痛苦了,改一个地方要重启一次dev-server
  • 最好在没上SSR时就有意识地将数据访问接口抽象到组件外部,组件内仅实现一个preFetch接口
    • 这样可以无缝衔接SSR,几乎不用改业务代码

然后接webpack的话,webpack的配置其实直接拿别人配好的用就可以了 。webpack1可以参考本博客之前的构建配置,webpack2可以参考Evan官方的构建配置

详细的配置过程我写过两篇文章,有兴趣的话可以看一看

Vue2.0服务端渲染: 博客前台升级记录

Vue2服务端渲染: 踩坑合集

from blog.

Related Issues (16)

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.