kenberkeley / vue-demo

Vue.js 示例项目 · 简易留言板。本项目拥有完善的文档说明与注释,让您快速上手 Vue.js 开发 SPA。Webpack / ES6 + Babel / Vue Router / (Vue Resource?) / (Vue Validator?) / (Vuex?) —— An Excellent Vue Starter with Best Practice / 最佳实践
https://kenberkeley.github.io/vue-demo/dist
Apache License 2.0
1.29k stars 410 forks source link

想搭建这个demo的vue2.0要注意什么 #22

Closed luuman closed 7 years ago

kenberkeley commented 7 years ago

我向来不建议别人在实际项目中使用 Vue2.x 但如果说真的要上的话,最好:

  1. 升级 Webpack 2.x
  2. 升级 ESLint 3.x
  3. Vue 全家桶都得升,注意 Vue 1.x 与 2.x 的区别
luuman commented 7 years ago

最近刚开始学vue 2.0,觉得你的项目结构很赞,而且公司要用2.0,

kenberkeley commented 7 years ago

那这样的话,只需要不使用 Vue 1.x 的语法,升级一下 loader 就好了,其他可以暂时不折腾

luuman commented 7 years ago

恩,暂时还在看vue 的文档,

kenberkeley commented 7 years ago

推荐 http://cn.vuejs.org/v2/guide/migration.html

luuman commented 7 years ago

我现在就是想,先把环境好,之后再研究你的代码!只是大概的骨架

luuman commented 7 years ago

webpack升级2.0之后,打包还能使用?会报错

luuman commented 7 years ago

应为之前我一直是使用gulp搭建的

kenberkeley commented 7 years ago

Webpack 1.x 和 2.x 的变化也比较大,见 Migrating from v1 to v2

kenberkeley commented 7 years ago

Vue2 脚手架已出!!! #26