使用Vue.js构建服务器渲染的应用程序

网友投稿 706 2022-10-23

使用Vue.js构建服务器渲染的应用程序

使用Vue.js构建服务器渲染的应用程序

Install

yarn add ream

Usage

Unlike a regular Vue SPA, you must export a function which returns an object in your app entry in order to make it work with Ream:

// index.jsimport Vue from 'vue'import Router from 'vue-router'Vue.use(Router)export default () => ({ router: new Router({ mode: 'history', routes: [{ path: '/', // Dynamically load your index component component: () => import('./index.vue') }] })})

And that's it, run ream dev and have fun playing with your app at http://localhost:4000.

Roadmap

Document how to modify internal webpack config. Add proper tests.

To make things happen faster, you may consider becoming a patron to support the development:

Contributing

Fork it!Create your feature branch: git checkout -b my-new-featureCommit your changes: git commit -am 'Add some feature'Push to the branch: git push origin my-new-featureSubmit a pull request :D

Author

ream © egoist, Released under the MIT License. Authored and maintained by egoist with help from contributors (list).

github.com/egoist · GitHub @egoist · Twitter @_egoistlily

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:nyoj86 找球号(一) set容器和二分 两种解法
下一篇:nyoj586||poj2456 二分+贪心
相关文章

 发表评论

暂时没有评论,来抢沙发吧~